Skip to content

Commit 3d7fdce

Browse files
committed
Change transfer_from for posix destination to use output dir
Instead of using tmpdir and moving to the new location which might then involve a copy (and in some cases fill up tmpdir)
1 parent 98ea8a4 commit 3d7fdce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/lsst/resources/file.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ def transfer_from(
183183
)
184184

185185
# We do not have to special case FileResourcePath here because
186-
# as_local handles that.
187-
with src.as_local(multithreaded=multithreaded) as local_uri:
186+
# as_local handles that. If remote download, download it to the
187+
# destination directory to allow an atomic rename.
188+
with src.as_local(multithreaded=multithreaded, tmpdir=self.dirname()) as local_uri:
188189
is_temporary = local_uri.isTemporary
189190
local_src = local_uri.ospath
190191

0 commit comments

Comments
 (0)