close before rename

This commit is contained in:
zzz
2015-09-24 19:08:36 +00:00
parent 0faa5ba2f4
commit 04690bed9f

View File

@ -1259,6 +1259,8 @@ public class SnarkManager implements CompleteListener {
_snarks.put(filename, torrent);
}
} catch (IOException ioe) {
// close before rename/delete for windows
if (fis != null) try { fis.close(); fis = null; } catch (IOException ioe2) {}
String err = _("Torrent in \"{0}\" is invalid", sfile.toString()) + ": " + ioe.getMessage();
addMessage(err);
_log.error(err, ioe);