Fix autosave files created in parent directory
ClosedPublic

Authored by dimitril on Feb 28 2016, 9:32 PM.

Details

Summary

Solve the issue where the autosave files are created in the parent directory instead of in the directory where the original .kra file is saved

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dimitril updated this revision to Diff 2488.Feb 28 2016, 9:32 PM
dimitril retitled this revision from to Fix autosave files created in parent directory.
dimitril updated this object.
dimitril edited the test plan for this revision. (Show Details)
dimitril set the repository for this revision to R37 Krita.
dimitril added a project: Krita.
Restricted Application added a subscriber: woltherav. · View Herald TranscriptFeb 28 2016, 9:32 PM
dimitril edited reviewers, added: dkazakov; removed: Krita.Feb 28 2016, 9:38 PM
dimitril added a subscriber: Krita.
dkazakov accepted this revision.Feb 29 2016, 7:02 AM
dkazakov edited edge metadata.

Hi, Dimitri!

Firstly, thank you for your patch! You did a very nice catch!

The only thing that the patch needs is to become a bit more portable. On Windows, we have a different directory separator, so it should be used. And yes, the file should be kept hidden. So the name should be of a form like:

dir + QDir::separator() + . + filename + "-autosave" + extension.

If you fix the issue with the separator, you can push the changes directly to master without further review. If you don't have a commit access, please update the patch and I will push it for you :)

This revision is now accepted and ready to land.Feb 29 2016, 7:02 AM
dimitril updated this revision to Diff 2489.Feb 29 2016, 9:45 AM
dimitril edited edge metadata.
dimitril removed R37 Krita as the repository for this revision.

Saving autosaved files as a hiding file.
Replacing the '/' by QDir::separator() in order to have multi-plateform support.

The new patch is cropped at the right :(

Could you please generate a new diff using:

git diff > your_patch.diff
dimitril updated this revision to Diff 2508.Mar 1 2016, 1:03 PM
dimitril set the repository for this revision to R37 Krita.

Solving an unlucky copy paste

This revision was automatically updated to reflect the committed changes.

I am not sure but i noticed that the files are still being created in parent directory, i'll test it once again before opening this issue again.