@@ -356,6 +356,9 @@ func (fsh *FileSystemHandler) DeleteFileRecord(rpath string) error {
//Close an openeded File System
func (fsh *FileSystemHandler) Close() {
+ //Set the close flag to true so others function wont access it
+ fsh.Closed = true
+
//Close the fsh database
if fsh.FilesystemDatabase != nil {
fsh.FilesystemDatabase.Close()
@@ -26,7 +26,7 @@ func DiskQuotaInit() {
Desc: "User Remaining Space",
IconPath: "SystemAO/disk/quota/img/small_icon.png",
Group: "Disk",
- StartDir: "SystemAO/disk/quota/quota.system",
+ StartDir: "SystemAO/disk/quota/quota.html",
})
//Register the timer for running the global user quota recalculation
@@ -225,6 +225,10 @@ func GetFSHandlerSubpathFromVpath(vpath string) (*fs.FileSystemHandler, string,
return nil, "", errors.New("Unable to resolve requested path: " + err.Error())
}
+ if fsh.Closed {
+ return nil, "", errors.New("Target file system handler already closed")
+ }
return fsh, subpath, nil