From b68ac864fa4d6ce06c6183be0b5bd3aa3541bcbb Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 24 Oct 2021 00:16:33 -0700 Subject: [PATCH] Return a pathclass object from @property drive. --- voussoirkit/pathclass.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index c37a800..673cf52 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -215,7 +215,10 @@ class Path: @property def drive(self): - return os.path.splitdrive(self.absolute_path)[0] + drive = os.path.splitdrive(self.absolute_path)[0] + if not drive.endswith(self.sep): + drive += self.sep + return self.spawn(drive) @property def exists(self):