mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Fix sized filesystem
If purging is enabled, overwriting a file with a file of the same or smaller size will not result in an error. It is now possible to change the purging mode on an existing sized filesystem.
This commit is contained in:
@@ -426,7 +426,7 @@ func (a *api) start() error {
|
||||
} else {
|
||||
a.memfs.SetMetadata("base", baseMemFS.String())
|
||||
if sizedfs, ok := a.memfs.(fs.SizedFilesystem); ok {
|
||||
sizedfs.Resize(cfg.Storage.Memory.Size * 1024 * 1024)
|
||||
sizedfs.Resize(cfg.Storage.Memory.Size*1024*1024, cfg.Storage.Memory.Purge)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user