fixed bug in normalizePath(..) when dealing with UN*X/OSX root paths...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-11-12 02:43:12 +04:00
parent 778d2f1dc6
commit 34d9ab4ba2
2 changed files with 6 additions and 1 deletions

View File

@ -615,6 +615,11 @@ function normalizePath(url, base, mode, do_unescape){
if(/^[A-Z]:\//.test(url)){ if(/^[A-Z]:\//.test(url)){
url = 'file:///' + 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... // we got absolute path...
if(/^(file|http|https):\/\/.*$/.test(url)){ if(/^(file|http|https):\/\/.*$/.test(url)){

View File

@ -66,7 +66,7 @@ var KEYBOARD_CONFIG = {
// NOTE: these are for systems where F** keys are not available // NOTE: these are for systems where F** keys are not available
// or do other stuff... // or do other stuff...
R: { R: {
'ctrl': doc('Reload viewer', 'ctrl+alt': doc('Reload viewer',
function(){ function(){
reloadViewer() reloadViewer()
return false return false