File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -147,19 +147,21 @@ def trim_listing(obj):
147
147
# Download http Files
148
148
def downloadHttpFile (httpurl ):
149
149
cache_session = None
150
- if "HOME " in os .environ :
150
+ if "XDG_CACHE_HOME " in os .environ :
151
151
cache_session = CacheControl (
152
152
requests .Session (),
153
153
cache = FileCache (
154
- os .path .join (os .environ ["HOME" ], ".cache" , "cwltool" )))
155
- elif "TMP " in os .environ :
154
+ os .path .join (os .environ ["XDG_CACHE_HOME" ] , "cwltool" )))
155
+ elif "HOME " in os .environ :
156
156
cache_session = CacheControl (
157
157
requests .Session (),
158
- cache = FileCache (os .path .join (os .environ ["TMP" ], ".cache" , "cwltool" )))
158
+ cache = FileCache (
159
+ os .path .join (os .environ ["HOME" ], ".cache" , "cwltool" )))
159
160
else :
160
161
cache_session = CacheControl (
161
162
requests .Session (),
162
- cache = FileCache ("/tmp" , ".cache" , "cwltool" ))
163
+ cache = FileCache (
164
+ os .path .join (os .path .expanduser ('~' ), ".cache" , "cwltool" )))
163
165
164
166
r = cache_session .get (httpurl , stream = True )
165
167
with NamedTemporaryFile (mode = 'wb' , delete = False ) as f :
You can’t perform that action at this time.
0 commit comments