File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,12 +152,20 @@ def download_file(
152152 skip : bool = True
153153 # For now, skip does nothing
154154 ):
155- # If it exists and skip is true, do not download
156- name = os .path .join (directory , name )
157- name = os .path .abspath (name )
158-
159- if os .path .isfile (name ) & skip == True :
160- return name , None
155+ ## If it exists and skip is true, do not download
156+ # name = os.path.join(directory, name)
157+ # name = os.path.abspath(name)
158+ # This name overwrites the value into name
159+ # Causes a problem on line 175 if name is expected to be empty
160+ # On first run of download file name is supposed to ''
161+ # Loaded as default value from action-datatorch.yaml
162+ # But on subsequent runs if file exists, name is not empty
163+ # Temporary fix here
164+ dl_file = os .path .join (directory , name )
165+ dl_file = os .path .abspath (dl_file )
166+
167+ if os .path .isfile (dl_file ) & skip == True :
168+ return dl_file , None
161169
162170 query_string = urlencode ({"download" : "true" , "stream" : "true" })
163171 url = normalize_api_url (self .api_url )
You can’t perform that action at this time.
0 commit comments