This commit is contained in:
Lucio Lelii 2019-04-16 16:31:31 +00:00
parent 95261236f4
commit 93113ce220
1 changed files with 3 additions and 3 deletions

View File

@ -142,14 +142,14 @@ public class ItemSharing {
ses.save();
toReturn = sharedFolderNode.getIdentifier();
} finally {
ses.getWorkspace().getLockManager().unlock(sharedFolderNode.getPath());
if (!ses.hasPendingChanges())
ses.getWorkspace().getLockManager().unlock(sharedFolderNode.getPath());
}
}catch(RepositoryException re){
log.error("jcr sharing", re);
GXOutboundErrorResponse.throwException(new BackendGenericError("jcr error extracting archive", re));
GXOutboundErrorResponse.throwException(new BackendGenericError("jcr error sharing folder", re));
}catch(StorageHubException she ){
log.error(she.getErrorMessage(), she);
GXOutboundErrorResponse.throwException(she, Response.Status.fromStatusCode(she.getStatus()));