diff --git a/toonz/sources/toonz/filebrowsermodel.cpp b/toonz/sources/toonz/filebrowsermodel.cpp index 0b8a47b..dc6f523 100644 --- a/toonz/sources/toonz/filebrowsermodel.cpp +++ b/toonz/sources/toonz/filebrowsermodel.cpp @@ -51,7 +51,13 @@ TFilePath getMyDocumentsPath() { return TFilePath((const char *)[documentsDirectory cStringUsingEncoding:NSASCIIStringEncoding]); #else - return TFilePath(); + std::string path(getenv("HOME")); + if(path.empty()) return TFilePath(); + path += "/Documents"; + QString pathAsQString = QString::fromStdString(path); + QDir dir(pathAsQString); + if(!dir.exists()) return TFilePath(); + return TFilePath(path); #endif } @@ -73,7 +79,13 @@ TFilePath getDesktopPath() { return TFilePath((const char *)[desktopDirectory cStringUsingEncoding:NSASCIIStringEncoding]); #else - return TFilePath(); + std::string path(getenv("HOME")); + if(path.empty()) return TFilePath(); + path += "/Desktop"; + QString pathAsQString = QString::fromStdString(path); + QDir dir(pathAsQString); + if(!dir.exists()) return TFilePath(); + return TFilePath(path); #endif } } @@ -1491,4 +1503,4 @@ void DvDirModel::onPreferenceChanged(const QString &prefName) { if (rootNode) rootNode->updateSceneFolderNodeVisibility(priority == Preferences::ProjectFolderOnly); -} \ No newline at end of file +}