summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-05-22 14:31:46 +0100
committerBen Brown <ben.brown@codethink.co.uk>2017-05-22 16:45:33 +0100
commit240c5806ae58d3cbda094d63ba4ad24676428c5a (patch)
tree6319e01fd2d05da77e4e3fcd952c114cd2d08d5d
parent3ad5536d2c6e35cab4f887bd9fc17aa581957e39 (diff)
downloadybd-240c5806ae58d3cbda094d63ba4ad24676428c5a.tar.gz
Only strip when path begins with './'
-rw-r--r--ybd/morphs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ybd/morphs.py b/ybd/morphs.py
index a9aa035..203401d 100644
--- a/ybd/morphs.py
+++ b/ybd/morphs.py
@@ -35,7 +35,10 @@ class Morphs(object):
for path in sorted(files):
data = self._load(path)
if data is not None:
- data['path'] = self._demorph(path[2:])
+ path = self._demorph(path)
+ if path.startswith('./'):
+ path = path[2:]
+ data['path'] = path
self._fix_keys(data)
self._tidy_and_insert_recursively(data)