in common/src/main/java/jetbrains/buildServer/torrent/torrent/TeamcityTorrentClient.java [58:73]
public boolean seedTorrent(@NotNull File torrentFile, @NotNull File srcFile) throws IOException, NoSuchAlgorithmException {
try {
myCommunicationManager.addTorrent(torrentFile.getAbsolutePath(), srcFile.getParent(), FullyPieceStorageFactory.INSTANCE);
return true;
} catch (FileNotFoundException e) {
LOG.debug("File " + srcFile.getName() + " is not found, ", e);
return false;
} catch (IllegalArgumentException e) {
//valid case since the library throws this exception when file was removed with parent directory
LOG.debug("File " + srcFile.getName() + " is not found, ", e);
return false;
} catch (Exception e) {
LOG.warn("Failed to seed file: " + srcFile.getName(), e);
return false;
}
}