From 34d9ab4ba2039c57f94f744e6c20e616cfa7a670 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 12 Nov 2013 02:43:12 +0400 Subject: [PATCH] fixed bug in normalizePath(..) when dealing with UN*X/OSX root paths... Signed-off-by: Alex A. Naanou --- ui/data.js | 5 +++++ ui/keybindings.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/data.js b/ui/data.js index 70b39c69..f4689cab 100755 --- a/ui/data.js +++ b/ui/data.js @@ -615,6 +615,11 @@ function normalizePath(url, base, mode, do_unescape){ if(/^[A-Z]:\//.test(url)){ url = 'file:///' + url } + // UN*X/OSX path... + if(url[0] == '/'){ + // XXX test exactly how many slashes to we need, two or three? + url = 'file://' + url + } // we got absolute path... if(/^(file|http|https):\/\/.*$/.test(url)){ diff --git a/ui/keybindings.js b/ui/keybindings.js index 96f32458..260e3175 100755 --- a/ui/keybindings.js +++ b/ui/keybindings.js @@ -66,7 +66,7 @@ var KEYBOARD_CONFIG = { // NOTE: these are for systems where F** keys are not available // or do other stuff... R: { - 'ctrl': doc('Reload viewer', + 'ctrl+alt': doc('Reload viewer', function(){ reloadViewer() return false