PR fixes
This commit is contained in:
parent
db45782b83
commit
ef8fa866c1
1 changed files with 6 additions and 6 deletions
|
@ -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());
|
||||
if (file.length()==filePart.getSize()) {
|
||||
fos.close();
|
||||
file.renameTo(app.getAppPath(destination + filePart.getFilename()));
|
||||
} else {
|
||||
copyFilesCache.put(key, fos);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue