Преглед на файлове

Tentative fix for Open In Explorer not working sometimes

Valden преди 1 година
родител
ревизия
fa2fd6c78f
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      hide/view/FileTree.hx

+ 4 - 1
hide/view/FileTree.hx

@@ -366,7 +366,10 @@ class FileTree extends FileView {
 		var fullPath = sys.FileSystem.absolutePath(path);
 
 		switch(Sys.systemName()) {
-			case "Windows": Sys.command("explorer.exe /select," + fullPath);
+			case "Windows": {
+				var cmd = "explorer.exe /select," + '"' + StringTools.replace(fullPath, "/", "\\") + '"';
+				Sys.command(cmd);
+			};
 			case "Mac":	Sys.command("open " + haxe.io.Path.directory(fullPath));
 			default: throw "Exploration not implemented on this platform";
 		}