Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-06-10 12:19:35 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-06-10 12:19:35 (GMT)
commit6b679e122c2a45e29b61287eef3c083822535f49 (patch)
treea5dd4185ecd15d9ee1b0719f5542fb7b5c41512c
parent4a8fc771fd47bd6f2f0182cbbe50c8fc5bcaa902 (diff)
Only one dot for the filename if we specify an extension
-rwxr-xr-xbin/copy-from-journal5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/copy-from-journal b/bin/copy-from-journal
index 2db06a5..457e9ff 100755
--- a/bin/copy-from-journal
+++ b/bin/copy-from-journal
@@ -101,11 +101,12 @@ if __name__ == "__main__":
outext = sugar.mime.get_primary_extension(mimetype)
if outext == None:
outext = "dsobject"
+ outext = '.' + outext
# Lastly, actually copy the file out of the datastore and onto the
# filesystem.
- shutil.copyfile(dsentry.get_file_path(), outroot + '.' + outext)
- print '%s -> %s' % (dsentry.get_file_path(), outroot + '.' + outext)
+ shutil.copyfile(dsentry.get_file_path(), outroot + outext)
+ print '%s -> %s' % (dsentry.get_file_path(), outroot + outext)
# Cleanup.
dsentry.destroy()