Le 30/10/2012 15:32, Christiano F. Haesbaert a écrit : > That should be an access(2) call. Yes.Something like this - also moved len to size_t, as strlen() is size_t:
--- dired.c Wed Mar 14 14:56:35 2012
+++ dired.c Tue Oct 30 16:23:00 2012
@@ -724,9 +724,10 @@
dired_(char *dname)
{
struct buffer *bp;
- int len, i;
+ int i;
+ size_t len;
- if ((fopen(dname,"r")) == NULL) {
+ if (access(dname, R_OK) == -1) {
if (errno == EACCES)
ewprintf("Permission denied");
return (NULL);
