Remove stale symlink
Needs RevisionPublic

Authored by sandsmark on Nov 14 2019, 12:51 PM.

Details

Reviewers
dfaure
Summary

When receiving a symlink, QFile::link will refuse in case the link already exist. This will cause updates to symlinks, or replacing files with a symlinked version to fail.

Patch stolen from https://github.com/reMarkable/karchive/pull/1

Diff Detail

Repository
R243 KArchive
Lint
Lint Skipped
Unit
Unit Tests Skipped
sandsmark created this revision.Nov 14 2019, 12:51 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 14 2019, 12:51 PM
Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald Transcript
sandsmark requested review of this revision.Nov 14 2019, 12:51 PM
dfaure accepted this revision.Feb 2 2020, 10:28 AM

Looks ok, although a unittest would have been even better.

This revision is now accepted and ready to land.Feb 2 2020, 10:28 AM

I've asked hhartz to create a test file, I'll ping him again on monday when I'm back at work.

dfaure added inline comments.Mar 10 2020, 1:38 AM
src/karchive.cpp
986

This is comparing the name of the symlink with the new target. Was this supposed to be looking at the target of the old symlink instead?

dfaure requested changes to this revision.Mar 10 2020, 1:38 AM
This revision now requires changes to proceed.Mar 10 2020, 1:38 AM