Dear all,
I am having random problems when I try to create a folder. Is there any way to ensure the creation of a folder? I am trying a while loop like the next but i am afraid to create an infinite loop.

Qt Code:
  1. //remove dir if exists
  2. QDir previousDir("previousDirPath");
  3. if(previousProprocessingDir.exists())
  4. removeDir(previousDirPath); //Custom process to remove dirs recursively
  5.  
  6. while (!QDir("previousDirPath").exists()) {
  7. QDir().mkdir("previousDirPath");
  8. }
To copy to clipboard, switch view to plain text mode 

Thanks