Skip to content

Commit

Permalink
fix: remove non-empty local copies of remote storage dirs (#2845)
Browse files Browse the repository at this point in the history
### QC
<!-- Make sure that you can tick the boxes below. -->

* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [x] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
  • Loading branch information
johanneskoester committed Apr 25, 2024
1 parent 28269b5 commit 71b2b87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snakemake/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ async def cleanup_storage_objects(self):
for f in chain(job.input, job.output):
if f.is_storage and f not in cleaned:
f.storage_object.cleanup()
tg.create_task(f.remove(only_local=True))
tg.create_task(
f.remove(remove_non_empty_dir=True, only_local=True)
)
cleaned.add(f)

def create_conda_envs(self, dryrun=False, quiet=False):
Expand Down

0 comments on commit 71b2b87

Please sign in to comment.