mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-07 03:55:26 +00:00
Fix links with leading slash
This commit is contained in:
parent
fadbb72e67
commit
068f2db12c
@ -161,7 +161,12 @@ var retrieve_file = function(path) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var normalize_path = function(path) {
|
var normalize_path = function(path) {
|
||||||
// make relative paths absolute
|
// make relative paths absolute in context of our virtual file tree
|
||||||
|
|
||||||
|
while (path && path[0] == '/') {
|
||||||
|
path = path.substr(1);
|
||||||
|
}
|
||||||
|
|
||||||
var result = window.global_context.current_path;
|
var result = window.global_context.current_path;
|
||||||
result = result.split('/');
|
result = result.split('/');
|
||||||
result.pop();
|
result.pop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user