Fix a bug where if the local directory specified does not exist, create

it.
This commit is contained in:
Juan Carlos Cornejo 2011-11-14 23:34:33 -05:00 committed by Klaas Freitag
parent cfa98f9f88
commit b171f33e59

View file

@ -1322,8 +1322,13 @@ void OwnCloudSync::initialize(QString host, QString user, QString pass,
mWebdav->initialize(mHost+"/files/webdav.php",
mUsername,mPassword,"/files/webdav.php");
// Create a File System Watcher
// Create the local directory if it doesn't exist
QDir localDir(mLocalDirectory);
if(!localDir.exists()) {
localDir.mkpath(mLocalDirectory);
}
// Create a File System Watcher
delete mFileWatcher;
mFileWatcher = new QFileSystemWatcher(this);
connect(mFileWatcher,SIGNAL(fileChanged(QString)),