Merge branch 'lstat' of UBB/points into master

This commit is contained in:
Chris Cromer 2018-12-08 15:54:41 -03:00 committed by Gitea
commit b84ca04aeb

View File

@ -173,7 +173,7 @@ int read_file(char *filename, point_t **points, unsigned int *n) {
int j = 0; int j = 0;
struct stat statbuff; struct stat statbuff;
stat(filename, &statbuff); lstat(filename, &statbuff);
if (access(filename, F_OK) || !S_ISREG(statbuff.st_mode)) { if (access(filename, F_OK) || !S_ISREG(statbuff.st_mode)) {
fprintf(stderr, "Error: El archivo \"%s\" no existe!\n", filename); fprintf(stderr, "Error: El archivo \"%s\" no existe!\n", filename);
return 1; return 1;