[Pkg-mozext-commits] [adblock-plus] 336/464: Build proper script paths, Linux doesn't like ./foo/bar.js/../bas/script.js

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 7d606b55689d169cd3fc07eac02c71f6f77a5dfd
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri Dec 14 18:29:11 2012 +0100

    Build proper script paths, Linux doesn't like ./foo/bar.js/../bas/script.js
---
 jshydra.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/jshydra.js b/jshydra.js
index 7fcb1b1..046bb65 100644
--- a/jshydra.js
+++ b/jshydra.js
@@ -5,6 +5,8 @@ var include = function(file)
 
   if (include.dirStack.length && !/^([a-zA-Z]:)?[\/\\]/.test(file))
     file = include.dirStack[include.dirStack.length - 1] + "/../" + file;
+  while (/\/[^.\/][^\/]*\/\.\.(?=\/)/.test(file))
+    file = file.replace(/\/[^.\/][^\/]*\/\.\.(?=\/)/, "");
 
   include.dirStack.push(file);
   try

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list