File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 39
39
# Test if file exists
40
40
infile = os .path .join (args .INPUT_FOLDER , row [0 ][0 :2 ], row [0 ])
41
41
if os .path .isfile (infile ):
42
- if "/" in row [2 ]:
43
- # Make directories
44
- dirpath = os .path .join (args .OUTPUT_FOLDER , os .path .dirname (row [2 ]))
45
- if not os .path .isdir (dirpath ):
46
- os .makedirs (dirpath )
47
- copyfile (infile , os .path .join (args .OUTPUT_FOLDER , row [2 ]))
48
- copied += 1
49
- if args .verbose :
50
- print ("Copied {} to {}" .format (row [0 ], row [2 ]))
42
+ if row [2 ]:
43
+ if "/" in row [2 ]:
44
+ # Make directories
45
+ dirpath = os .path .join (args .OUTPUT_FOLDER , os .path .dirname (row [2 ]))
46
+ if not os .path .isdir (dirpath ):
47
+ os .makedirs (dirpath )
48
+ copyfile (infile , os .path .join (args .OUTPUT_FOLDER , row [2 ]))
49
+ copied += 1
50
+ if args .verbose :
51
+ print ("Copied {} to {}" .format (row [0 ], row [2 ]))
51
52
else :
52
53
if args .verbose :
53
54
print ("File {} not found" .format (row [0 ]))
You can’t perform that action at this time.
0 commit comments