mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-02-04 05:47:00 +03:00
Merge pull request #187 from altlinux/fix_delete_action_file_cp
appliers/file_cp.py: fix file delete for substitutions
This commit is contained in:
commit
3fb3f2e857
@ -127,7 +127,7 @@ class Files_cp:
|
||||
|
||||
def _delete_action(self):
|
||||
list_target = [self.targetPath.name]
|
||||
if self.is_pattern(self.targetPath.name):
|
||||
if self.is_pattern(self.targetPath.name) and self.targetPath.parent.exists() and self.targetPath.parent.is_dir():
|
||||
list_target = fnmatch.filter([str(x.name) for x in self.targetPath.parent.iterdir() if x.is_file()], self.targetPath.name)
|
||||
logdata = dict()
|
||||
for targetFile in list_target:
|
||||
|
Loading…
x
Reference in New Issue
Block a user