explorer: fixed go up on root crash (jerome's fix)
[ede] / explorer / src / ExplorerWindow.ec
index 6d6ee59..82c991e 100644 (file)
@@ -126,6 +126,11 @@ class ExplorerWindow : Window
                char * path = view.path;
                char * newPath = new char[strlen(path)];
                StripLastDirectory(path, newPath);
+               if(!newPath[0])
+               {
+                  newPath[0] = '/';
+                  newPath[1] = 0;
+               }
                view.path = newPath;
                delete newPath;
                break;
@@ -282,6 +287,18 @@ class ExplorerWindow : Window
       locationBox = addressBar;
       navigateFolders = true;
       borderStyle = none;
+
+      bool NotifyNodeOpen(FileSystemBox box, FileSystemNode node)
+      {
+         if(node.type.isFile)
+         {
+            char command[MAX_LOCATION];
+            char * t = node.path;
+            sprintf(command, "ide %s", node.path);
+            ShellOpen(command);
+         }
+         return true;
+      }
    };
 
    /*ExplorerSearch search