mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Use real free/total disk space values for the repository filesystem, if the content store supports them. ALF-1530.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22893 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -98,12 +98,18 @@ public class ContentQuotaManager implements QuotaManager, Runnable {
|
||||
* @return long
|
||||
*/
|
||||
public long getAvailableFreeSpace() {
|
||||
|
||||
// Get the live free space value from the content store, if supported
|
||||
|
||||
// Return a dummy value for now
|
||||
//
|
||||
// Need to find the content store size and return the live available space value if possible
|
||||
|
||||
return 100 * MemorySize.GIGABYTE;
|
||||
long freeSpace = m_filesys.getContentService().getStoreFreeSpace();
|
||||
if ( freeSpace == -1L) {
|
||||
|
||||
// Content store does not support sizing, return a large dummy value
|
||||
|
||||
freeSpace = ContentDiskDriver.DiskFreeDefault;
|
||||
}
|
||||
|
||||
return freeSpace;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user