mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Add live usage quota manager implementation to the file server. ALF-1068.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19840 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -273,7 +273,7 @@ public class ContentNetworkFile extends NodeRefNetworkFile
|
||||
* @see NetworkFile#WRITEONLY
|
||||
* @see NetworkFile#READWRITE
|
||||
*/
|
||||
private void openContent(boolean write, boolean trunc)
|
||||
protected void openContent(boolean write, boolean trunc)
|
||||
throws AccessDeniedException, AlfrescoRuntimeException
|
||||
{
|
||||
// Check if the file is a directory
|
||||
@@ -359,6 +359,17 @@ public class ContentNetworkFile extends NodeRefNetworkFile
|
||||
|
||||
channel = ((ContentReader) content).getFileChannel();
|
||||
}
|
||||
|
||||
// Update the current file size
|
||||
|
||||
if ( channel != null) {
|
||||
try {
|
||||
setFileSize(channel.size());
|
||||
}
|
||||
catch (IOException ex) {
|
||||
logger.error( ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user