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. Qt rmdir function
Qt 6.11 is out! See what's new in the release blog

Qt rmdir function

Scheduled Pinned Locked Moved General and Desktop
11 Posts 5 Posters 6.6k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    dialingo
    wrote on last edited by
    #2

    Does your application have enough rights to delete the folder? Maybe root created it and your application is not allowed to remove it.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qwertyuiopearendil
      wrote on last edited by
      #3

      My app create folder, than i supposed that the answer to your questio is yes.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #4

        Are your directories empty? The docs of [[Doc:QDir]] state:

        bq. The directory must be empty for rmdir() to succeed.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #5

          Is the directory empty when you try to delete it? Can you provide a small compilable test case that reproduces it so that we can try it please?

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qwertyuiopearendil
            wrote on last edited by
            #6

            Found my problem: My folder is not empty because system doesn't permit to remove a file that my app create.
            I create file, write into and also close.
            Why in your opinion?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dialingo
              wrote on last edited by
              #7

              Under Linux you can determine the permission of files to be created with umask

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZapB
                wrote on last edited by
                #8

                We don't know without more info. What OS are you on? Does anything else have a handle to your file? Is it a race condition? Please make a small compilable example.

                Nokia Certified Qt Specialist
                Interested in hearing about Qt related work

                1 Reply Last reply
                0
                • Q Offline
                  Q Offline
                  qwertyuiopearendil
                  wrote on last edited by
                  #9

                  Found and closed all my problems!
                  i created my files into my folder using a QThread but the delete operation was done from main thread... then main thread wasn't able to delete all files.

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ZapB
                    wrote on last edited by
                    #10

                    Aha so a race condition then. They are always fun ;-)

                    Nokia Certified Qt Specialist
                    Interested in hearing about Qt related work

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      DenisKormalev
                      wrote on last edited by
                      #11

                      Good to know :) don't forget to mark thread as [solved], please.

                      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