Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Failure to return file paths in server 2008 qt QDirIterator
QtWS25 Last Chance

Failure to return file paths in server 2008 qt QDirIterator

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 469 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ErfanCoder
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

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

      E 1 Reply Last reply
      3
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        4
        • mrjjM mrjj

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

          E Offline
          E Offline
          ErfanCoder
          wrote on last edited by ErfanCoder
          #4

          @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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved