Return a pathclass object from @property drive.

master
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
1 changed files with 4 additions and 1 deletions

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