Return a pathclass object from @property drive.

This commit is contained in:
voussoir 2021-10-24 00:16:33 -07:00
parent d082a0fbb5
commit b68ac864fa
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -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):