mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
create path on msd image uploading
This commit is contained in:
parent
cd3c28e97f
commit
3c29e8f61a
@ -269,6 +269,7 @@ class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attribu
|
||||
async def open(self) -> "MsdFileWriter":
|
||||
assert self.__file is None
|
||||
get_logger(1).info("Writing %r image (%d bytes) to MSD ...", self.__name, self.__file_size)
|
||||
os.makedirs(os.path.dirname(self.__path), exist_ok=True)
|
||||
self.__file = await aiofiles.open(self.__path, mode="w+b", buffering=0) # type: ignore
|
||||
return self
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user