aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2014-04-11 13:06:09 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2014-04-21 12:10:20 -0400
commit18a9c50db6db680070948fd42043ea0a89deaa6f (patch)
tree5c36f31c04e694fa05053af764ee81898dce1da7
parent7b1ee4711c7ade0d1b4dba90b7199f969b9912b1 (diff)
downloadmediagoblin-18a9c50db6db680070948fd42043ea0a89deaa6f.tar.lz
mediagoblin-18a9c50db6db680070948fd42043ea0a89deaa6f.tar.xz
mediagoblin-18a9c50db6db680070948fd42043ea0a89deaa6f.zip
Fixed incorrectly coded references to filesystem paths
-rw-r--r--mediagoblin/gmg_commands/batchaddmedia.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/mediagoblin/gmg_commands/batchaddmedia.py b/mediagoblin/gmg_commands/batchaddmedia.py
index 68993aa2..b058a47e 100644
--- a/mediagoblin/gmg_commands/batchaddmedia.py
+++ b/mediagoblin/gmg_commands/batchaddmedia.py
@@ -98,10 +98,8 @@ zip files and directories"
if dir_path.endswith('/'):
dir_path = dir_path[:-1]
- location_file_path = "{dir_path}/location.csv".format(
- dir_path=dir_path)
- metadata_file_path = "{dir_path}/metadata.csv".format(
- dir_path=dir_path)
+ location_file_path = os.path.join(dir_path,"location.csv")
+ metadata_file_path = os.path.join(dir_path, "metadata.csv")
# check for the location file, if it exists...
location_filename = os.path.split(location_file_path)[-1]
@@ -163,9 +161,7 @@ zip files and directories"
if os.path.isabs(path):
file_abs_path = os.path.abspath(path)
else:
- file_path = "{dir_path}/{local_path}".format(
- dir_path=dir_path,
- local_path=path)
+ file_path = os.path.join(dir_path, path)
file_abs_path = os.path.abspath(file_path)
try:
media_file = file(file_abs_path, 'r')