summaryrefslogtreecommitdiffstats
path: root/src/findfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/findfile.c')
-rw-r--r--src/findfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/findfile.c b/src/findfile.c
index b4aed048ce..4f457b9386 100644
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -1735,11 +1735,11 @@ find_file_in_path_option(
proc->pr_WindowPtr = (APTR)-1L;
# endif
- if (len == 0)
- return NULL;
-
if (first == TRUE)
{
+ if (len == 0)
+ return NULL;
+
// copy file name into NameBuff, expanding environment variables
save_char = ptr[len];
ptr[len] = NUL;