Skip to content

Commit 0bfd081

Browse files
committed
Fix: get_recent_filename
This function should have never worked unless one operates in the current working directory.
1 parent b4b4642 commit 0bfd081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def get_recent_filename(fdir, base, extension):
447447
files = [f for f in os.listdir(fdir) if (f.startswith(base) and
448448
f.endswith(extension))]
449449

450-
files.sort(key=lambda x: os.path.getmtime(x))
450+
files.sort(key=lambda x: os.path.getmtime(os.path.join(fdir, x)))
451451

452452
try:
453453
return files.pop()

0 commit comments

Comments
 (0)