[Patch] - Port kded/vfolder_menu.cpp to QDirIterator
David Faure
faure at kde.org
Mon Feb 23 12:30:21 GMT 2009
On Sunday 22 February 2009, Christian Ehrlicher wrote:
> Hi,
>
> attached you can find a patch to port vfolder_menu.cpp to QDirIterator
> to resolve possible problems with filename encodings on windows.
>
> I'm unsure about ::stat(), S_ISREG ( buff.st_mode ) <->
> QFileInfo::isFile() when a file is a symlink. Maybe someone can take a
> look on it if I did it right.
stat() follows symlinks (unlike lstat), so stat+S_ISREG would say true
for a symlink-to-a-file (and false for a symlink-to-a-dir).
But QFileInfo::isFile() works exactly the same way, so no problem, just
test for isFile(), no need for isSymLink().
On that note, please make sure symlinks to dirs are followed too.
That's what the DT_LNK was added for. Bug 150307.
--
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list