From 1ce4508a80532192f7f56a6ff75ea94f214b1ece Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 3 Dec 2014 13:55:43 +0100 Subject: [PATCH] Fix for absolute relative path handling --- client/cli/bam.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/cli/bam.py b/client/cli/bam.py index c98ea66..cc70319 100755 --- a/client/cli/bam.py +++ b/client/cli/bam.py @@ -269,16 +269,14 @@ class bam_session: # we should be clever - add the file to a useful location based on some rules # (category, filetype & tags?) - # XXX, remap! fn_rel = os.path.relpath(fn_abs, session_rootdir) - # TODO(cam) # remap paths of added files if fn_rel.startswith("_"): + fn_rel = fn_rel[1:] + else: if paths_remap_relbase: - fn_rel = os.path.join(paths_remap_relbase, fn_rel[1:]) - else: - fn_rel = fn_rel[1:] + fn_rel = os.path.join(paths_remap_relbase, fn_rel) paths_add[fn_rel] = fn_abs