Previously we would fail to start if the directory was not existing.
This was working for relative directory, but it should also work for
absolute ones
https://github.com/owncloud/enterprise/issues/970
if( dirPath.isEmpty() ) return false;
QFileInfo fi(dirPath);
- if ( !fi.exists() && !fi.isAbsolute() ) {
- QDir::current().mkdir(dirPath);
- QDir dir = QDir::current();
- dir.cd(dirPath);
- fi.setFile(dir.path());
+ if ( !fi.exists() ) {
+ QDir().mkpath(dirPath);
+ fi.setFile(dirPath);
}
if( fi.exists() && fi.isDir() ) {
dirPath = fi.absoluteFilePath();