try creating the file before the lock

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550648 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-12-13 05:31:21 +00:00
parent a597458ba9
commit 3e91228d28
1 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ public class DefaultFileLockManager
try try
{ {
createNewFileQuietly( file );
lock.openLock( false, timeout > 0 ); lock.openLock( false, timeout > 0 );
acquired = true; acquired = true;
} }
@ -170,7 +171,7 @@ public class DefaultFileLockManager
try try
{ {
file.createNewFile(); createNewFileQuietly( file );
lock.openLock( true, timeout > 0 ); lock.openLock( true, timeout > 0 );
acquired = true; acquired = true;
} }