Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Failure to return file paths in server 2008 qt QDirIterator



  • I want to see the whole path of a drive, I did it on Windows 8 and 9, the paths are displayed correctly.

    But in Windows 2003 and 2008, the paths are not displayed, what's the problem? My code

    #include <QCoreApplication>
    #include <QtCore>
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
        QDirIterator it("C:/",QStringList() << "*",  QDir::Files , QDirIterator::Subdirectories);
        while(it.hasNext())
        {
            qDebug() << it.next();
        }
        return a.exec();
    }
    

    link image :
    https://imgur.com/a/BscmOsJ


  • Lifetime Qt Champion

    Hi and welcome to the forums.
    Are you certain you have rights to enumerate folder in c:\ for the user account on the server ?



  • Hi, just tested your program on my Windows 2003 SP1 Server, works fine.
    I used Qt 5.7 MSVC2013 to build as console program (it's very tricky to get Qt builds using MSVC2015, MSVC2017 or MSVC2019 to run on my Windows 2003 Server).
    I tested by running locally on the C: and logged in as an Administrator.

    So I agree with @mrjj it could be an access or security problem.



  • @mrjj said in Failure to return file paths in server 2008 qt QDirIterator:

    Hi and welcome to the forums.
    Are you certain you have rights to enumerate folder in c:\ for the user account on the server ?

    yes ,
    im using qt 5.8 msvc2015


Log in to reply