aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/g10/misc.c b/g10/misc.c
index c5b97740c..b0fe82560 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -1251,7 +1251,15 @@ path_access(const char *file,int mode)
envpath=getenv("PATH");
- if(file[0]=='/' || !envpath)
+ if(!envpath
+#ifdef HAVE_DRIVE_LETTERS
+ || (((file[0]>='A' && file[0]<='Z')
+ || (file[0]>='a' && file[0]<='z'))
+ && file[1]==':')
+#else
+ || file[0]=='/'
+#endif
+ )
return access(file,mode);
else
{