Line
Link Here
|
0 |
-- mg-20130922-orig/file.c |
0 |
++ mg-20130922/file.c |
Lines 669-679
Link Here
|
669 |
{ |
669 |
{ |
670 |
struct stat statbuf; |
670 |
struct stat statbuf; |
671 |
int s; |
671 |
int s; |
672 |
char *dp; |
672 |
char ts[NFILEN], *dp; |
673 |
|
|
|
674 |
dp = dirname(fn); |
675 |
|
673 |
|
676 |
if (stat(fn, &statbuf) == -1 && errno == ENOENT) { |
674 |
if (stat(fn, &statbuf) == -1 && errno == ENOENT) { |
|
|
675 |
(void)strlcpy(ts, fn, NFILEN); |
676 |
dp = dirname(ts); |
677 |
errno = 0; |
677 |
errno = 0; |
678 |
if (access(dp, W_OK) && errno == EACCES) { |
678 |
if (access(dp, W_OK) && errno == EACCES) { |
679 |
ewprintf("Directory %s%s write-protected", dp, |
679 |
ewprintf("Directory %s%s write-protected", dp, |