Steve Borho  committed 0162d25

visdiff: catch OSError and IOError when deleting temp files

This is slightly better than throwing up a bug report, but only just.

Closes #1135

  • Participants
  • Parent commits 16540a3
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgtk/

             ui.note(_('cleaning up temp directory\n'))
-            shutil.rmtree(tmproot)
+            try:
+                shutil.rmtree(tmproot)
+            except (IOError, OSError), e:
+                # Leaking temporary files, fix your diff tool config
+                ui.note(_('unable to clean temp directory: %s\n'), str(e))
     tmproot = tempfile.mkdtemp(prefix='visualdiff.')
     if opts.get('mainapp'):