Return a pathclass object from @property drive.
This commit is contained in:
parent
d082a0fbb5
commit
b68ac864fa
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue