This commit is contained in:
madwasp79 2019-02-08 14:16:56 +02:00
parent db45782b83
commit ef8fa866c1

View file

@ -1988,22 +1988,22 @@ public class OsmandAidlApi {
copyFilesCache.remove(key);
fos.close();
file.renameTo(app.getAppPath(destination + filePart.getFilename()));
// file.delete();
return true;
} else if (file.length() == filePart.getSentSize()) {
fos.write(filePart.getFilePartData());
return true;
}
return false;
} else {
// if (file.exists()) {
// file.delete();
// }
file.getParentFile().mkdirs();
fos = new FileOutputStream(file, true);
fos.write(filePart.getFilePartData());
copyFilesCache.put(key, fos);
if (file.length()==filePart.getSize()) {
fos.close();
file.renameTo(app.getAppPath(destination + filePart.getFilename()));
} else {
copyFilesCache.put(key, fos);
}
return true;
}