- files.c:check_writable_directory() - Stat full_path, not path (Steven Kneizys)

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta 2002-03-06 15:32:17 +00:00
parent 40ecbad296
commit 564535a6f7
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,9 @@ CVS code -
- General - General
- Type misalignments and mem leaks in renumber_all, do_justify - Type misalignments and mem leaks in renumber_all, do_justify
and do_spell (Rocco & Steven Kneizys). and do_spell (Rocco & Steven Kneizys).
- files.c:
check_writable_directory()
- Stat full_path, not path (Steven Kneizys).
- nano.c: - nano.c:
main() main()
- Put NANO_SMALL defines around toggle pointer (noticed by Jordi); - Put NANO_SMALL defines around toggle pointer (noticed by Jordi);

View File

@ -970,7 +970,7 @@ char *check_writable_directory(const char *path) {
/* otherwise, stat() the full path to see if it's writable by the /* 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 */ 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) if (fileinfo.st_mode & S_IWUSR)
writable = 1; writable = 1;
else else