Эх сурвалжийг харах

Set failed locking

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 жил өмнө
parent
commit
9887e0fc07

+ 1 - 7
src/main/java/com/owncloud/android/operations/UploadFileOperation.java

@@ -421,14 +421,8 @@ public class UploadFileOperation extends SyncOperation {
                         channel = new RandomAccessFile(temporalFile.getAbsolutePath(), "rw").getChannel();
                         fileLock = channel.tryLock();
                     } else {
-                        Files.deleteIfExists(Paths.get(temporalPath));
-                        result = copy(originalFile, temporalFile);
+                        result = new RemoteOperationResult(ResultCode.LOCK_FAILED);
 
-                        if (result == null) {
-                            channel = new RandomAccessFile(temporalFile.getAbsolutePath(), "rw").
-                                    getChannel();
-                            fileLock = channel.tryLock();
-                        }
                     }
                 }
             }