KAutoSaveFile does not correctly handle simple characters like spaces in file names!!!
When creating a stale file (backup file) , to determine the file name it uses:
in tempFileName(), line 83:
return QString::fromLatin1(QUrl::toPercentEncoding(name).constData());
So the filename is encoded using percent encoding. But when checking for an existing backup file, it does:
in extractManagedFilePath, line 180:
managedFileName.setPath(QUrl::fromPercentEncoding(encodedPath) + QLatin1Char('/') + QFileInfo(staleFileName.left(sepPos)).fileName());
So the path part is correctly restored from percent encoding, but the filename part is not decoded.
So we end up comparing "my file" with "my%20file" and the stale file is not correctly identified!