version 1.57, 2013/05/30 04:17:25 |
version 1.58, 2013/05/30 04:27:18 |
|
|
int i; |
int i; |
size_t len; |
size_t len; |
|
|
if ((access(dname, R_OK | X_OK)) == -1) { |
|
if (errno == EACCES) |
|
ewprintf("Permission denied"); |
|
return (NULL); |
|
} |
|
if ((dname = adjustname(dname, FALSE)) == NULL) { |
if ((dname = adjustname(dname, FALSE)) == NULL) { |
ewprintf("Bad directory name"); |
ewprintf("Bad directory name"); |
return (NULL); |
return (NULL); |
|
|
if (dname[len - 1] != '/') { |
if (dname[len - 1] != '/') { |
dname[len++] = '/'; |
dname[len++] = '/'; |
dname[len] = '\0'; |
dname[len] = '\0'; |
|
} |
|
if ((access(dname, R_OK | X_OK)) == -1) { |
|
if (errno == EACCES) |
|
ewprintf("Permission denied"); |
|
return (NULL); |
} |
} |
if ((bp = findbuffer(dname)) == NULL) { |
if ((bp = findbuffer(dname)) == NULL) { |
ewprintf("Could not create buffer"); |
ewprintf("Could not create buffer"); |