Browse Source

Remove a couple of outdated comments

These caused a bit of confusion when reading the code
main
Jonne Ransijn 11 months ago committed by Devine Lu Linvega
parent
commit
2cc0bbdd07
  1. 5
      src/devices/file.c

5
src/devices/file.c

@ -140,20 +140,19 @@ retry_realpath(const char *file_name)
return NULL; return NULL;
} }
if(notdriveroot(file_name)) { if(notdriveroot(file_name)) {
/* TODO: use a macro instead of '/' for absolute path first character so that other systems can work */
/* if a relative path, prepend cwd */ /* if a relative path, prepend cwd */
getcwd(p, sizeof(p)); getcwd(p, sizeof(p));
if(strlen(p) + strlen(DIR_SEP_STR) + fnlen >= PATH_MAX) { if(strlen(p) + strlen(DIR_SEP_STR) + fnlen >= PATH_MAX) {
errno = ENAMETOOLONG; errno = ENAMETOOLONG;
return NULL; return NULL;
} }
strcat(p, DIR_SEP_STR); /* TODO: use a macro instead of '/' for the path delimiter */ strcat(p, DIR_SEP_STR);
} }
strcat(p, file_name); strcat(p, file_name);
while((r = realpath(p, NULL)) == NULL) { while((r = realpath(p, NULL)) == NULL) {
if(errno != ENOENT) if(errno != ENOENT)
return NULL; return NULL;
x = strrchr(p, DIR_SEP_CHAR); /* TODO: path delimiter macro */ x = strrchr(p, DIR_SEP_CHAR);
if(x) if(x)
*x = '\0'; *x = '\0';
else else

Loading…
Cancel
Save