Skip to content

Commit

Permalink
Only keep the last path element when naming files uploaded via the URL
Browse files Browse the repository at this point in the history
paste method
  • Loading branch information
natefoo committed Feb 27, 2017
1 parent c8dd5f9 commit f645259
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/data_source/upload.py
Expand Up @@ -95,6 +95,7 @@ def add_file( dataset, registry, json_file, output_path ):
file_err( 'Unable to fetch %s\n%s' % ( dataset.path, str( e ) ), dataset, json_file )
return
dataset.path = temp_name
dataset.name = os.path.basename( dataset.name )
# See if we have an empty file
if not os.path.exists( dataset.path ):
file_err( 'Uploaded temporary file (%s) does not exist.' % dataset.path, dataset, json_file )
Expand Down

0 comments on commit f645259

Please sign in to comment.