mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 23:58:29 +00:00
[WINESYNC] Fail gracefully when unable to delete a file
This commit is contained in:
parent
d4e38a630f
commit
fd00338b59
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,10 @@ class wine_sync:
|
||||||
warning_message += 'Error while applying patch to ' + new_reactos_path + '\n'
|
warning_message += 'Error while applying patch to ' + new_reactos_path + '\n'
|
||||||
|
|
||||||
if delta.status == pygit2.GIT_DELTA_DELETED:
|
if delta.status == pygit2.GIT_DELTA_DELETED:
|
||||||
|
try:
|
||||||
self.reactos_index.remove(old_reactos_path)
|
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
|
# 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)):
|
elif os.path.isfile(os.path.join(self.reactos_src, new_reactos_path)):
|
||||||
self.reactos_index.add(new_reactos_path)
|
self.reactos_index.add(new_reactos_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue