Bug 364596 - Swap on alternative directory failing
Summary: Swap on alternative directory failing
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 3.14.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 13:07 UTC by Massimo Burcheri
Modified: 2016-09-05 09:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Burcheri 2016-06-21 13:07:52 UTC
This is Kate 3.14.21 and kdevelop 4.90.01.

After bug 362288 I tried using an alternative directory for swapping: ~/.kate.swp
But the directory does not get any new files. Attaching strace to kdevelop I found some failed tries to write there:

lstat("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp", 0x7ffcc3ad3ac0) = -1 ENOENT (No such file or directory)
open("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 38
lstat("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp", {st_mode=S_IFREG|0644, st_size=48, ...}) = 0
unlink("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp") = 0
lstat("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp", 0x7ffcc3ad3ac0) = -1 ENOENT (No such file or directory)
open("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 38
lstat("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp", {st_mode=S_IFREG|0644, st_size=48, ...}) = 0
unlink("/home.crypt/mb/.kate.swp/\302\207\302\2147cd\303\217\37Sk\22\30\302\212o\302\234\302\241\303\206\303\274\303\204'\303\226.kate-swp") = 0


Reproducible: Always
Comment 1 Christoph Cullmann 2016-09-04 14:27:32 UTC
Think have a fix for that:

https://phabricator.kde.org/D2653
Comment 2 Kåre Särs 2016-09-04 14:31:15 UTC
This is fixed already in KTextEditor (to be KF5.26) even without the new review
Comment 3 Christoph Cullmann 2016-09-05 09:58:59 UTC
Ok, nice to know.
Btw., I submitted my revision, that will make the file names actually encoded in some sensible manner and connect the swap files to file name not content.