diff --git a/pd/src/s_file.c b/pd/src/s_file.c
index 32f54c312d8d21cadd790b2ecd1abb3926181c3c..8bf515e747b4018339df4a577d1f351073af0505 100644
--- a/pd/src/s_file.c
+++ b/pd/src/s_file.c
@@ -646,8 +646,10 @@ char *sys_recent_files[MAX_RECENT_FILES];
 
 static int fexists(const char *s)
 {
-  struct stat statbuf;
-  return stat(s, &statbuf) == 0;
+  FILE *fp = sys_fopen(s, "r");
+  if (!fp) return 0;
+  sys_fclose(fp);
+  return 1;
 }
 
 void sys_add_recent_file(const char *s)