D29610: [kio_file] Handle renaming file 'A' to 'a' on FAT32 filesystems

Ahmad Samir noreply at phabricator.kde.org
Wed May 13 15:53:09 BST 2020


ahmadsamir added a comment.


  In D29610#667858 <https://phabricator.kde.org/D29610#667858>, @dfaure wrote:
  
  > OK for now, to fix the unittests. The *real* fix however is to use QFile::rename in kio_file so that this failure to rename doesn't even happen in the first place.
  >
  > In this commit can you at least leave a TODO to that effect?
  
  
  Took me a long while "to do" it.
  
  So many quirks, bin/jobtest shows output (qDebug() << 'blah bleh' in e.g. file_unix.cpp) that 'ctest -V -R kiocore-jobtest' for some reason doesn't show. And of course kdeinit5.
  
  So it's CopyJob -> SimpleJob -> SlaveBase -> FileProtocol, so many redirections and pinging from one place in the code to the other, fun stuff... :)

INLINE COMMENTS

> dfaure wrote in copyjob.cpp:1965
> Why this check? The next line compares absolute paths -- including the parent dir.
> 
> Hmm OK one could manufacture a special case with /dir/file and /DIR/FILE where the compare() passes but the parent dirs differ. The orig code had that bug... OK :)

Good point, I missed that the original code was checking the file names and the paths with the same compare() call.

About /dir/file and /DIR/FILE, the parent dirs is actually one dir since "dir" and "DIR" are the same from FAT32 old POV?

REPOSITORY
  R241 KIO

BRANCH
  l-qfile-rename (branched from master)

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/20200513/015679b6/attachment.htm>


More information about the Kde-frameworks-devel mailing list