https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fd00338b593a8183e4e60baaa9e0a7b46c5eaff9
commit fd00338b593a8183e4e60baaa9e0a7b46c5eaff9 Author: Mark Jansen <mark.jan...@reactos.org> AuthorDate: Mon Mar 14 00:03:40 2022 +0100 Commit: Mark Jansen <mark.jan...@reactos.org> CommitDate: Sat Apr 9 01:26:30 2022 +0200 [WINESYNC] Fail gracefully when unable to delete a file --- sdk/tools/winesync/winesync.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/tools/winesync/winesync.py b/sdk/tools/winesync/winesync.py index 44fbf1e332f..8547ee97306 100644 --- a/sdk/tools/winesync/winesync.py +++ b/sdk/tools/winesync/winesync.py @@ -186,7 +186,10 @@ class wine_sync: warning_message += 'Error while applying patch to ' + new_reactos_path + '\n' if delta.status == pygit2.GIT_DELTA_DELETED: - self.reactos_index.remove(old_reactos_path) + try: + self.reactos_index.remove(old_reactos_path) + except IOError as err: + warning_message += 'Error while removing file ' + old_reactos_path + '\n' # here we check if the file exists. We don't complain, because applying the patch already failed anyway elif os.path.isfile(os.path.join(self.reactos_src, new_reactos_path)): self.reactos_index.add(new_reactos_path)