Check if file is accessible

This commit is contained in:
Arun Prakash Jana 2020-03-14 21:44:48 +05:30
parent 4e58ad318c
commit 67994ff4b2
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -5807,7 +5807,7 @@ nochange:
rundir[0] = '\0';
}
if (newpath[0])
if (newpath[0] && !access(newpath, F_OK))
xstrlcpy(lastname, xbasename(newpath), NAME_MAX+1);
else if (ndents)
copycurname();