Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dvc/stage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ def remove_outs(self, ignore_remove=False, force=False) -> None:

def unprotect_outs(self) -> None:
for out in self.outs:
out.unprotect()
if out.use_cache:
out.unprotect()
Comment on lines +388 to +389
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already how unprotect works.

dvc/dvc/output.py

Lines 1079 to 1084 in dcf6f48

def unprotect(self):
if self.exists and self.use_cache:
with TqdmCallback(
size=self.meta.nfiles or -1, desc=f"Unprotecting {self}"
) as callback:
self.cache.unprotect(self.fs_path, callback=callback)


def ignore_remove_outs(self) -> None:
for out in self.outs:
Expand Down