Skip to content

Commit

Permalink
Merge pull request #198 from doronz88/bugfix/crash_reports_erase
Browse files Browse the repository at this point in the history
crash_reports: bugfix: erase non-pulled files
  • Loading branch information
doronz88 authored Dec 5, 2021
2 parents 74d0939 + 344078c commit 6396aa9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pymobiledevice3/services/crash_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ def log(src, dst):
self.afc.pull(entry, out, callback=log)

if erase:
self.clear()
if posixpath.normpath(entry) in ('.', '/'):
self.clear()
else:
self.afc.rm(entry, force=True)

def flush(self):
""" Trigger com.apple.crashreportmover to flush all products into CrashReports directory """
Expand Down

0 comments on commit 6396aa9

Please sign in to comment.