mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
free_space is storage service dependent
This commit is contained in:
1 file changed
+7
-2
@@ -49,8 +49,13 @@ class Library < ApplicationRecord
|
||||
end
|
||||
|
||||
def free_space
|
||||
stat = Sys::Filesystem.stat(path)
|
||||
stat.bytes_available
|
||||
case storage_service
|
||||
when "filesystem"
|
||||
stat = Sys::Filesystem.stat(path)
|
||||
stat.bytes_available
|
||||
else
|
||||
raise "Invalid storage service: #{storage_service}"
|
||||
end
|
||||
end
|
||||
|
||||
def storage_key
|
||||
|
||||
Reference in new issue
Block a user