summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd/otg/storage.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/msd/otg/storage.py')
-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)