From d31ff68b93b3624bd81a0bac02775f2633a0fffb Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Fri, 20 Mar 2015 20:14:21 +0000 Subject: [PATCH] auto_init: resolve rel paths only on init only if not http (though should support other protocols eventually) --- pywb/webapp/pywb_init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pywb/webapp/pywb_init.py b/pywb/webapp/pywb_init.py index cad3d1a6..4f39c1d9 100644 --- a/pywb/webapp/pywb_init.py +++ b/pywb/webapp/pywb_init.py @@ -1,4 +1,4 @@ -from pywb.utils.loaders import load_yaml_config +from pywb.utils.loaders import load_yaml_config, is_http from pywb.framework.archivalrouter import ArchivalRouter, Route from pywb.framework.proxy import ProxyArchivalRouter @@ -158,12 +158,12 @@ class DirectoryCollsLoader(object): def _norm_path(self, root_dir, path): result = os.path.normpath(os.path.join(root_dir, path)) - print(result) return result def _add_dir_if_exists(self, coll, root_dir, dir_key, required=False): if dir_key in coll: - coll[dir_key] = self._norm_path(root_dir, coll[dir_key]) + if not is_http(coll[dir_key]): + coll[dir_key] = self._norm_path(root_dir, coll[dir_key]) + os.path.sep return False thedir = self.config.get('paths')[dir_key]