Browse Source

Transmission: only forcefully add trailing slash to download location if it is not yet there. Fixes #52.

pull/148/merge
Eric Kok 11 years ago
parent
commit
71151f5dca
  1. 5
      lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java

5
lib/src/org/transdroid/daemon/Transmission/TransmissionAdapter.java

@ -493,12 +493,15 @@ public class TransmissionAdapter implements IDaemonAdapter { @@ -493,12 +493,15 @@ public class TransmissionAdapter implements IDaemonAdapter {
if (!commentString.equals("")) {
errorString = errorString.equals("")? commentString : errorString + "\n" + commentString;
}
String locationDir = tor.getString(RPC_DOWNLOADDIR);
if (!locationDir.endsWith(settings.getOS().getPathSeperator()))
locationDir += settings.getOS().getPathSeperator();
torrents.add(new Torrent(
tor.getInt(RPC_ID),
null,
tor.getString(RPC_NAME),
hasError? TorrentStatus.Error: getStatus(tor.getInt(RPC_STATUS)),
tor.getString(RPC_DOWNLOADDIR) + settings.getOS().getPathSeperator(),
locationDir,
tor.getInt(RPC_RATEDOWNLOAD),
tor.getInt(RPC_RATEUPLOAD),
tor.getInt(RPC_PEERSGETTING),

Loading…
Cancel
Save