#242 additional change

This commit is contained in:
Vadim Lopatin 2017-08-25 19:52:41 +03:00
parent c16c69c344
commit b84498ea4f
1 changed files with 4 additions and 3 deletions

View File

@ -268,7 +268,8 @@ class FileDialog : Dialog, CustomGridCellAdapter {
//import dlangui.dialogs.msgbox; //import dlangui.dialogs.msgbox;
//auto msgBox = new MessageBox(UIString.fromId("MESSAGE_ERROR"c), UIString.fromRaw(e.msg.toUTF32), window()); //auto msgBox = new MessageBox(UIString.fromId("MESSAGE_ERROR"c), UIString.fromRaw(e.msg.toUTF32), window());
//msgBox.show(); //msgBox.show();
return false; //return false;
// show empty dir if failed to read
} }
_fileList.rows = 0; _fileList.rows = 0;
_path = dir; _path = dir;
@ -665,9 +666,9 @@ class FileDialog : Dialog, CustomGridCellAdapter {
onItemSelected(row); onItemSelected(row);
}; };
if (_path.empty || !_path.isDir) { if (_path.empty || !_path.exists || !_path.isDir) {
_path = currentDir; _path = currentDir;
if (!_path.isDir) if (!_path.exists || !_path.isDir)
_path = homePath; _path = homePath;
} }
openDirectory(_path, _filename); openDirectory(_path, _filename);