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