summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-19 01:17:31 +0200
committerMaxim Devaev <[email protected]>2023-03-19 02:16:20 +0200
commit84563553b8a2f00bbb4b1559029f77ad225627f4 (patch)
tree6795ccb04bff10d2c2bd09c1ce6381f381727007 /kvmd/plugins
parent097dbc517df4fcfb8d37d958744b1eb1f0e8d8b6 (diff)
fixed msd parts api
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/msd/otg/storage.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kvmd/plugins/msd/otg/storage.py b/kvmd/plugins/msd/otg/storage.py
index 08853947..e4339fed 100644
--- a/kvmd/plugins/msd/otg/storage.py
+++ b/kvmd/plugins/msd/otg/storage.py
@@ -152,7 +152,10 @@ class _Part(_PartDc):
async def _reload(self) -> None: # Only for Storage()
st = await aiotools.run_async(os.statvfs, self.__path)
- writable = await aiofiles.os.access(self.__path, os.W_OK) # type: ignore
+ if self.name == "":
+ writable = True
+ else:
+ writable = await aiofiles.os.access(self.__path, os.W_OK) # type: ignore
object.__setattr__(self, "size", st.f_blocks * st.f_frsize)
object.__setattr__(self, "free", st.f_bavail * st.f_frsize)
object.__setattr__(self, "writable", writable)