aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2014-06-06 07:53:34 +0300
committerJukka Jylänki <jujjyl@gmail.com>2014-06-06 07:53:54 +0300
commit4fb1b159f14714278fc6f32457a76731af6331a2 (patch)
tree55e92287b721f14fbc7b96209468c0a393aadc66
parentd55c8eba3d4b28447e656b744773c86fa87b609f (diff)
Fix issue in tools/ffdb.py where installing an app using a relative path would place the files in wrong directory inside the zip file, causing the install to fail after upload is finished.
-rwxr-xr-xtools/ffdb.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ffdb.py b/tools/ffdb.py
index 4974957d..d201b1c5 100755
--- a/tools/ffdb.py
+++ b/tools/ffdb.py
@@ -35,9 +35,10 @@ def zipdir(path, zipfilename):
(root, file) = tuple
filename = os.path.join(root, file)
filesize = os.path.getsize(filename)
- print 'Compressing ' + str(n) + '/' + str(len(files_to_compress)) + ': "' + os.path.relpath(filename, path) + '" (' + sizeof_fmt(filesize) + ')...'
+ path_in_archive = os.path.relpath(filename, path)
+ print 'Compressing ' + str(n) + '/' + str(len(files_to_compress)) + ': "' + path_in_archive + '" (' + sizeof_fmt(filesize) + ')...'
n += 1
- zipf.write(os.path.join(root, file))
+ zipf.write(os.path.join(root, file), path_in_archive)
zipf.close()
print 'Done. '