<table><tr><td style="">mardelle created this revision.<br />mardelle added reviewers: Frameworks, shaforostoff.<br />Restricted Application added a project: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8084" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>KAutoSaveFile does not correctly handle simple characters like spaces in file names!!!<br />
When creating a stale file (backup file) , to determine the file name it uses:<br />
in tempFileName(), line 83:<br />
return QString::fromLatin1(QUrl::toPercentEncoding(name).constData());</p>
<p>So the filename is encoded using percent encoding. But when checking for an existing backup file, it does:<br />
in extractManagedFilePath, line 180:<br />
managedFileName.setPath(QUrl::fromPercentEncoding(encodedPath) + QLatin1Char('/') + QFileInfo(staleFileName.left(sepPos)).fileName());</p>
<p>So the path part is correctly restored from percent encoding, but the filename part is not decoded.<br />
So we end up comparing "my file" with "my%20file" and the stale file is not correctly identified!</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Project files with space in their name in Kdenlive now have crash recovery working</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8084" rel="noreferrer">https://phabricator.kde.org/D8084</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/lib/io/kautosavefile.cpp</div></div></div><br /><div><strong>To: </strong>mardelle, Frameworks, shaforostoff<br /></div>