-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111724/#review36603
-----------------------------------------------------------


::rename also is only for files on the same partition, so that's not the issue. 
The problem is more likely the error handling, i.e. recognizing that the 
renaming failed because of that particular reason, and falling back (in libkio) 
to a copy followed by a delete (this only happens when the error code is 
ERROR_UNSUPPORTED_ACTION).

Anyway. I think we're making this more complex than it has to be. This is 
unix-only code, and it doesn't even have the largefile issues that other APIs 
have.
KDE_rename() is always ::rename(), on Unix, as can be seen in kde_file.h.

So I suggest to just use ::rename() instead of KDE_rename().

- David Faure


On July 26, 2013, 4:10 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111724/
> -----------------------------------------------------------
> 
> (Updated July 26, 2013, 4:10 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Description
> -------
> 
> Ports KDE_rename(..) to QFile::rename(..). All tests pass except those where 
> moving dirs between partitions occur. The Qt4 docs says "rename will fail if 
> newName and oldName are not on the same partition" for QDir::rename(); 
> there's no such mention in Qt 5.dev docs but it still seems to be the case 
> and I'm unsure what to do, please advise.
> 
> 
> Diffs
> -----
> 
>   kioslave/file/file_unix.cpp 64cffa0 
> 
> Diff: http://git.reviewboard.kde.org/r/111724/diff/
> 
> 
> Testing
> -------
> 
> All tests pass except moving dirs between partitions.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to