switch CWD to home if default is "/" or contains "AppData"
This commit is contained in:
@ -83,8 +83,11 @@ LammpsGui::LammpsGui(QWidget *parent, const QString &filename) :
|
|||||||
capturer = new StdCapture;
|
capturer = new StdCapture;
|
||||||
current_file.clear();
|
current_file.clear();
|
||||||
current_dir = QDir(".").absolutePath();
|
current_dir = QDir(".").absolutePath();
|
||||||
// use $HOME if we get dropped to "/" like on macOS
|
// use $HOME if we get dropped to "/" like on macOS or the installation folder like on Windows
|
||||||
if (current_dir == "/") current_dir = QDir::homePath();
|
if ((current_dir == "/") || (current_dir.path().contains("AppData")))
|
||||||
|
current_dir = QDir::homePath();
|
||||||
|
QDir::setCurrent(current_dir);
|
||||||
|
|
||||||
inspectList.clear();
|
inspectList.clear();
|
||||||
setAutoFillBackground(true);
|
setAutoFillBackground(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user