diff options
-rw-r--r-- | providers/bundles/org.eclipse.ecf.provider.bittorrent/src/org/eclipse/ecf/internal/provider/bittorrent/TorrentFileTransfer.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.bittorrent/src/org/eclipse/ecf/internal/provider/bittorrent/TorrentFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.bittorrent/src/org/eclipse/ecf/internal/provider/bittorrent/TorrentFileTransfer.java index a0dfb0033..d642b911e 100644 --- a/providers/bundles/org.eclipse.ecf.provider.bittorrent/src/org/eclipse/ecf/internal/provider/bittorrent/TorrentFileTransfer.java +++ b/providers/bundles/org.eclipse.ecf.provider.bittorrent/src/org/eclipse/ecf/internal/provider/bittorrent/TorrentFileTransfer.java @@ -196,7 +196,19 @@ final class TorrentFileTransfer implements IFileTransferPausable, IFileTransferR } public long getFileLength() { - return -1; + return torrent.getTorrentFile().getTotalLength(); + } + + /* (non-Javadoc) + * @see org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getRemoteFileName() + */ + public String getRemoteFileName() { + if (torrent == null) + return null; + if (!torrent.getTorrentFile().isMultiFile()) { + return torrent.getTorrentFile().getFilenames()[0]; + } + return null; } } |