]> git.sur5r.net Git - bacula/bacula/commitdiff
bweb: try to handle windows drive better in bresto
authorEric Bollengier <eric@baculasystems.com>
Thu, 17 Nov 2011 08:55:01 +0000 (09:55 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:14 +0000 (14:50 +0200)
gui/bweb/html/bresto.js

index 5e62f464d555affb0583b60167218445f7763d34..d9fb76e9245f930c5577ded51a02cf8e5b635d19 100644 (file)
@@ -444,8 +444,10 @@ Ext.onReady(function(){
 
            if (r.json[4] == '..') {
               Ext.brestore.path = dirname(Ext.brestore.path);
-           } else if (r.json[4] == '/') {
+           } else if (r.json[4] == '/') {                // unix root
               Ext.brestore.path = '/';
+           } else if (r.json[4].match('^[a-zA-Z]:/$')) { // windows drive
+              Ext.brestore.path = r.json[4];
            } else if (r.json[4] != '.') {
               Ext.brestore.path = Ext.brestore.path + r.json[4];
            }
@@ -961,7 +963,7 @@ Ext.onReady(function(){
                     for(var i=0;i<data.selections.length;i++) {
                         var name = data.selections[i].json[4];
                         var fnid = data.selections[i].json[1];
-                        if (fnid == 0 && name != '..') {
+                        if (fnid == 0 && name != '..' && !name.match('/$')) {
                             name = name + '/';
                         }
                         r = new file_selection_record({