File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/src/main/java/com/owncloud/android/operations Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -982,7 +982,8 @@ private RemoteOperationResult normalUpload(OwnCloudClient client) {
982
982
final Long creationTimestamp = FileUtil .getCreationTimestamp (originalFile );
983
983
984
984
// Initialize channel and fileLock in try-with-resources
985
- try (RandomAccessFile randomAccessFile = new RandomAccessFile (mFile .getStoragePath (), "rw" );
985
+ try (
986
+ RandomAccessFile randomAccessFile = new RandomAccessFile (mFile .getStoragePath (), "rw" );
986
987
FileChannel channel = randomAccessFile .getChannel ();
987
988
FileLock fileLock = channel .tryLock ()
988
989
) {
@@ -998,9 +999,10 @@ private RemoteOperationResult normalUpload(OwnCloudClient client) {
998
999
if (result .isSuccess ()) {
999
1000
if (temporalFile .length () == originalFile .length ()) {
1000
1001
// Acquire lock on temporary file
1001
- try (RandomAccessFile randomAccessTemporalFile = new RandomAccessFile (temporalFile .getAbsolutePath (), "rw" );
1002
+ try (
1003
+ RandomAccessFile randomAccessTemporalFile = new RandomAccessFile (temporalFile .getAbsolutePath (), "rw" );
1002
1004
FileChannel tempChannel = randomAccessTemporalFile .getChannel ();
1003
- FileLock tempFileLock = tempChannel .tryLock ()) {
1005
+ FileLock tempFileLock = tempChannel .tryLock ()) {
1004
1006
if (tempFileLock != null ) {
1005
1007
// Use the temporary channel for the upload
1006
1008
size = tempChannel .size ();
You can’t perform that action at this time.
0 commit comments