forked from I2P_Developers/i2p.i2p
Prevent double-save for now and auto start all torrents if autostart is already set (don't make the user restart each one).
This commit is contained in:
@ -626,7 +626,10 @@ public class Snark
|
|||||||
pc.halt();
|
pc.halt();
|
||||||
Storage st = storage;
|
Storage st = storage;
|
||||||
if (st != null) {
|
if (st != null) {
|
||||||
boolean changed = storage.isChanged() || getUploaded() != savedUploaded;
|
// TODO: Cache the config-in-mem to compare vs config-on-disk
|
||||||
|
// (needed for auto-save to not double-save in some cases)
|
||||||
|
//boolean changed = storage.isChanged() || getUploaded() != savedUploaded;
|
||||||
|
boolean changed = true;
|
||||||
try {
|
try {
|
||||||
storage.close();
|
storage.close();
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
|
@ -105,7 +105,7 @@ public class SnarkManager implements CompleteListener {
|
|||||||
public static final String PROP_FILES_PUBLIC = "i2psnark.filesPublic";
|
public static final String PROP_FILES_PUBLIC = "i2psnark.filesPublic";
|
||||||
public static final String PROP_OLD_AUTO_START = "i2snark.autoStart"; // oops
|
public static final String PROP_OLD_AUTO_START = "i2snark.autoStart"; // oops
|
||||||
public static final String PROP_AUTO_START = "i2psnark.autoStart"; // convert in migration to new config file
|
public static final String PROP_AUTO_START = "i2psnark.autoStart"; // convert in migration to new config file
|
||||||
public static final String DEFAULT_AUTO_START = "false";
|
public static final String DEFAULT_AUTO_START = "true";
|
||||||
//public static final String PROP_LINK_PREFIX = "i2psnark.linkPrefix";
|
//public static final String PROP_LINK_PREFIX = "i2psnark.linkPrefix";
|
||||||
//public static final String DEFAULT_LINK_PREFIX = "file:///";
|
//public static final String DEFAULT_LINK_PREFIX = "file:///";
|
||||||
public static final String PROP_STARTUP_DELAY = "i2psnark.startupDelay";
|
public static final String PROP_STARTUP_DELAY = "i2psnark.startupDelay";
|
||||||
@ -2358,7 +2358,6 @@ public class SnarkManager implements CompleteListener {
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
addMessage(_("Stopping all torrents and closing the I2P tunnel."));
|
addMessage(_("Stopping all torrents and closing the I2P tunnel."));
|
||||||
count++;
|
count++;
|
||||||
saveTorrentStatus(snark);
|
|
||||||
if (finalShutdown)
|
if (finalShutdown)
|
||||||
snark.stopTorrent(true);
|
snark.stopTorrent(true);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user