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