fix: ZFSPath.from_string
This commit is contained in:
+4
-2
@@ -88,8 +88,10 @@ class ZFSPath:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_string(cls, string: str) -> ZFSPath:
|
def from_string(cls, string: str) -> ZFSPath:
|
||||||
path, snapname = string.split("@")
|
snapname = None
|
||||||
elements: list[str] = path.split("/")
|
if "@" in string:
|
||||||
|
string, snapname = string.split("@")
|
||||||
|
elements: list[str] = string.split("/")
|
||||||
return ZFSPath(elements, snapname)
|
return ZFSPath(elements, snapname)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user