Temporarily disable file delete
This commit is contained in:
@@ -122,7 +122,7 @@ public abstract class NetworkHandler {
|
||||
for (FileTransferInfo transferInfo : downloadQueue.values())
|
||||
{
|
||||
Util.cleanClose(transferInfo.outputStream);
|
||||
transferInfo.file.delete();
|
||||
//transferInfo.file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ public abstract class NetworkHandler {
|
||||
if (fileTransferInfo != null)
|
||||
{
|
||||
Util.cleanClose(fileTransferInfo);
|
||||
fileTransferInfo.file.delete();
|
||||
//fileTransferInfo.file.delete();
|
||||
}
|
||||
File file = downloadComplete.get(fileId);
|
||||
if (file != null)
|
||||
@@ -246,6 +246,7 @@ public abstract class NetworkHandler {
|
||||
|
||||
public void beginFile(long fileId, long expectedSize) throws IOException {
|
||||
File file = new File(fileId + "-cj-tmp.zip");
|
||||
System.out.println("Creating file " + file.toString());
|
||||
//file.deleteOnExit();
|
||||
OutputStream is = null;
|
||||
try
|
||||
@@ -269,6 +270,7 @@ public abstract class NetworkHandler {
|
||||
{
|
||||
Util.cleanClose(fileTransferInfo);
|
||||
this.downloadComplete.put(fileId, fileTransferInfo.file);
|
||||
System.out.println("Completed file " + fileTransferInfo.file.toString());
|
||||
synchronized (this.downloadComplete)
|
||||
{
|
||||
this.downloadComplete.notifyAll();
|
||||
|
||||
Reference in New Issue
Block a user