Fixed incorrectly coded references to filesystem paths
This commit is contained in:
parent
7b1ee4711c
commit
18a9c50db6
@ -98,10 +98,8 @@ zip files and directories"
|
|||||||
if dir_path.endswith('/'):
|
if dir_path.endswith('/'):
|
||||||
dir_path = dir_path[:-1]
|
dir_path = dir_path[:-1]
|
||||||
|
|
||||||
location_file_path = "{dir_path}/location.csv".format(
|
location_file_path = os.path.join(dir_path,"location.csv")
|
||||||
dir_path=dir_path)
|
metadata_file_path = os.path.join(dir_path, "metadata.csv")
|
||||||
metadata_file_path = "{dir_path}/metadata.csv".format(
|
|
||||||
dir_path=dir_path)
|
|
||||||
|
|
||||||
# check for the location file, if it exists...
|
# check for the location file, if it exists...
|
||||||
location_filename = os.path.split(location_file_path)[-1]
|
location_filename = os.path.split(location_file_path)[-1]
|
||||||
@ -163,9 +161,7 @@ zip files and directories"
|
|||||||
if os.path.isabs(path):
|
if os.path.isabs(path):
|
||||||
file_abs_path = os.path.abspath(path)
|
file_abs_path = os.path.abspath(path)
|
||||||
else:
|
else:
|
||||||
file_path = "{dir_path}/{local_path}".format(
|
file_path = os.path.join(dir_path, path)
|
||||||
dir_path=dir_path,
|
|
||||||
local_path=path)
|
|
||||||
file_abs_path = os.path.abspath(file_path)
|
file_abs_path = os.path.abspath(file_path)
|
||||||
try:
|
try:
|
||||||
media_file = file(file_abs_path, 'r')
|
media_file = file(file_abs_path, 'r')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user