]> git.wh0rd.org Git - nano.git/commitdiff
- files.c:check_writable_directory() - Stat full_path, not path (Steven Kneizys)
authorChris Allegretta <chrisa@asty.org>
Wed, 6 Mar 2002 15:32:17 +0000 (15:32 +0000)
committerChris Allegretta <chrisa@asty.org>
Wed, 6 Mar 2002 15:32:17 +0000 (15:32 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
files.c

index a47f5900427d4c352f3b9287cab1c7692f6f9144..4af142b1491c80bf202d77ccf9f793feaa096da9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@ CVS code -
 - General
        - Type misalignments and mem leaks in renumber_all, do_justify
          and do_spell (Rocco & Steven Kneizys).
+- files.c:
+  check_writable_directory()
+       - Stat full_path, not path (Steven Kneizys).
 - nano.c:
   main()
        - Put NANO_SMALL defines around toggle pointer (noticed by Jordi);
diff --git a/files.c b/files.c
index 880046c46d09eca1d6fb4374f04214d659eff8c3..6be091825152867d26f13d7207fa2faeb26050bc 100644 (file)
--- a/files.c
+++ b/files.c
@@ -970,7 +970,7 @@ char *check_writable_directory(const char *path) {
 
     /* otherwise, stat() the full path to see if it's writable by the
        user; set writable to 1 if it is, or 0 if it isn't */
-    stat(path, &fileinfo);
+    stat(full_path, &fileinfo);
     if (fileinfo.st_mode & S_IWUSR)
        writable = 1;
     else