mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Fix TmpDir and Location
TmpDir: Clean up before and after, not just after Location: Resolve path so that parent check works properly
This commit is contained in:
parent
2de4255a78
commit
df0eb84a44
2 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ class TmpDir(Location):
|
|||
"""Create a new temporary folder for the given path."""
|
||||
super().__init__(path)
|
||||
self._counter = 0
|
||||
self.cleanup()
|
||||
self.path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class Location:
|
|||
"""
|
||||
|
||||
def __init__(self, path: Path):
|
||||
self._path = path
|
||||
self._path = path.resolve()
|
||||
|
||||
@property
|
||||
def path(self) -> Path:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue