From cf8e7023be55c09d4d512f04e6ea486fabe772a4 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Mon, 16 Sep 2024 12:51:31 +0200 Subject: [PATCH] find_newest_file: Get folder of self --- stgpytools/types/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stgpytools/types/file.py b/stgpytools/types/file.py index fd5f9e5..7b3e3ac 100644 --- a/stgpytools/types/file.py +++ b/stgpytools/types/file.py @@ -172,7 +172,7 @@ def fglob(self, pattern: str = '*') -> SPath | None: def find_newest_file(self, pattern: str = '*') -> SPath | None: """Find the most recently modified file matching the given pattern in the directory.""" - matching_files = self.glob(pattern) + matching_files = self.get_folder().glob(pattern) if not matching_files: return None