Fix for absolute relative path handling

This commit is contained in:
2014-12-03 13:55:43 +01:00
parent 88021db1a1
commit 1ce4508a80

View File

@@ -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("_"):
if paths_remap_relbase:
fn_rel = os.path.join(paths_remap_relbase, fn_rel[1:])
else:
fn_rel = fn_rel[1:]
else:
if paths_remap_relbase:
fn_rel = os.path.join(paths_remap_relbase, fn_rel)
paths_add[fn_rel] = fn_abs