CC-2545:Airtime-import doesn't handle spaces in file/dir names
- fixed
This commit is contained in:
parent
1736675464
commit
f0cc6614d9
|
@ -35,6 +35,7 @@ def copy_or_move_files_to(paths, dest, flag):
|
|||
for path in paths:
|
||||
if(os.path.exists(path)):
|
||||
if(os.path.isdir(path)):
|
||||
path = format_dir_string(path)
|
||||
#construct full path
|
||||
sub_path = []
|
||||
for temp in os.listdir(path):
|
||||
|
@ -54,6 +55,11 @@ def copy_or_move_files_to(paths, dest, flag):
|
|||
else:
|
||||
print "Cannot find file or path: %s" % path
|
||||
|
||||
def format_dir_string(path):
|
||||
if(path[-1] != '/'):
|
||||
path = path+'/'
|
||||
return path
|
||||
|
||||
def helper_get_stor_dir():
|
||||
res = api_client.list_all_watched_dirs()
|
||||
if(res is None):
|
||||
|
|
Loading…
Reference in New Issue