bam-path-deps, write the project path into the json file

this is so we can tell what project directory we're relative to.
This commit is contained in:
2014-12-02 17:03:33 +01:00
parent 0a503a42d6
commit e613dacac5
2 changed files with 21 additions and 0 deletions

View File

@@ -390,6 +390,13 @@ class FileAPI(Resource):
# simple case
paths_remap[os.path.basename(filepath)] = os.path.basename(filepath)
if os.path.isfile(filepath):
paths_remap["."] = os.path.relpath(os.path.dirname(filepath), paths_remap_relbase)
else:
# TODO(cam) directory support
paths_remap["."] = os.path.relpath(filepath, paths_remap_relbase)
# TODO, avoid reopening zipfile
# append json info to zip
import zipfile