- Fix dup torrent msg with magnets (tickets #433 and #504)

- Fix state when storage dies during transition out of magnet mode
    - Fix NPE in magnet mode
    - Error logging improvements
    - Support add-torrent with infohash alone
    - CSS tweaks
This commit is contained in:
zzz
2012-03-24 12:58:13 +00:00
parent 008c79e743
commit bdfca07626
8 changed files with 44 additions and 12 deletions

View File

@ -1280,8 +1280,11 @@ public class SnarkManager implements Snark.CompleteListener {
return null;
}
saveTorrentStatus(meta, storage.getBitField(), null); // no file priorities
String name = (new File(getDataDir(), storage.getBaseName() + ".torrent")).getAbsolutePath();
// temp for addMessage() in case canonical throws
String name = storage.getBaseName();
try {
// _snarks must use canonical
name = (new File(getDataDir(), storage.getBaseName() + ".torrent")).getCanonicalPath();
// put the announce URL in the file
String announce = snark.getTrackerURL();
if (announce != null)
@ -1305,6 +1308,14 @@ public class SnarkManager implements Snark.CompleteListener {
return null;
}
/**
* A Snark.CompleteListener method.
* @since 0.9
*/
public void fatal(Snark snark, String error) {
addMessage(_("Error on torrent {0}", snark.getName()) + ": " + error);
}
// End Snark.CompleteListeners
/**