mirror of
https://github.com/Garmelon/PFERD.git
synced 2025-07-20 01:42:37 +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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user