diff --git a/law/target/local.py b/law/target/local.py index a0633584..1dc94e2e 100644 --- a/law/target/local.py +++ b/law/target/local.py @@ -518,6 +518,8 @@ def dump(self, *args, **kwargs) -> Any: ret = find_formatter(self.abspath, "dump", formatter).dump(self.abspath, *args, **kwargs) # chmod + if perm is None: + perm = self.fs.default_file_perm if perm and self.exists(): self.chmod(perm) @@ -591,6 +593,8 @@ def localize( # simply yield yield self + if perm is None: + perm = self.fs.default_file_perm self.chmod(perm, silent=True)