mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +08:00
explicit image name
This commit is contained in:
parent
3c29e8f61a
commit
49a1beab37
@ -163,9 +163,9 @@ class BaseMsd(BasePlugin):
|
||||
|
||||
|
||||
class MsdFileReader(BaseMsdReader): # pylint: disable=too-many-instance-attributes
|
||||
def __init__(self, notifier: aiotools.AioNotifier, path: str, chunk_size: int) -> None:
|
||||
def __init__(self, notifier: aiotools.AioNotifier, name: str, path: str, chunk_size: int) -> None:
|
||||
self.__notifier = notifier
|
||||
self.__name = os.path.basename(path)
|
||||
self.__name = name
|
||||
self.__path = path
|
||||
self.__chunk_size = chunk_size
|
||||
|
||||
@ -222,9 +222,9 @@ class MsdFileReader(BaseMsdReader): # pylint: disable=too-many-instance-attribu
|
||||
|
||||
|
||||
class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attributes
|
||||
def __init__(self, notifier: aiotools.AioNotifier, path: str, file_size: int, sync_size: int, chunk_size: int) -> None:
|
||||
def __init__(self, notifier: aiotools.AioNotifier, name: str, path: str, file_size: int, sync_size: int, chunk_size: int) -> None:
|
||||
self.__notifier = notifier
|
||||
self.__name = os.path.basename(path)
|
||||
self.__name = name
|
||||
self.__path = path
|
||||
self.__file_size = file_size
|
||||
self.__sync_size = sync_size
|
||||
|
||||
@ -307,6 +307,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
|
||||
image = self.__STATE_get_storage_image(name)
|
||||
self.__reader = await MsdFileReader(
|
||||
notifier=self.__notifier,
|
||||
name=image.name,
|
||||
path=image.path,
|
||||
chunk_size=self.__read_chunk_size,
|
||||
).open()
|
||||
@ -332,6 +333,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
|
||||
|
||||
self.__writer = await MsdFileWriter(
|
||||
notifier=self.__notifier,
|
||||
name=image.name,
|
||||
path=image.path,
|
||||
file_size=size,
|
||||
sync_size=self.__sync_chunk_size,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user