1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

appliers/file_cp.py: fix file delete for substitutions

This commit is contained in:
Valery Sinelnikov 2022-12-23 14:33:01 +04:00
parent fe63894ad8
commit 26908178d3

View File

@ -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: