D29610: [kio_file] Handle renaming file 'A' to 'a' on FAT32 filesystems
David Faure
noreply at phabricator.kde.org
Thu May 14 08:42:04 BST 2020
dfaure added inline comments.
INLINE COMMENTS
> file_unix.cpp:1074
>
> if (::rename(_src.data(), _dest.data())) {
> if (auto err = execWithElevatedPrivilege(RENAME, {_src, _dest}, errno)) {
Wouldn't it be enough to just call QFile::rename here?
The whole idea is: if QFile::rename is able to rename a file in all cases, including the a->A special case on FAT, then let's just delegate the renaming to QFile.
Then we don't need to have any special case in our code.
QFile::rename does not overwrite, though, so if the dest exists and the Overwrite flag is set, we might have to either delete the dest first (race condition, not sure it matters here), or in *that* case use ::rename() since we know it can't be a FAT32-case-change (FAT32 can't have both a and A).
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D29610
To: ahmadsamir, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200514/3fbd2e8f/attachment.htm>
More information about the Kde-frameworks-devel
mailing list