diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-23 13:41:14 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-23 13:41:14 -0500 |
commit | 7448aa490fb843089e5785d5a80f8a07ee50f93a (patch) | |
tree | a41ae0ce912a6af1c240b28f7c08ecedcf02ff3f /filesystem-posix.c | |
parent | f8f1db1b8d6476016f0e2f03504abd87025baa99 (diff) |
got directory symlinks to work in file selector
Diffstat (limited to 'filesystem-posix.c')
-rw-r--r-- | filesystem-posix.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/filesystem-posix.c b/filesystem-posix.c index cf4a04b..ebf1407 100644 --- a/filesystem-posix.c +++ b/filesystem-posix.c @@ -7,15 +7,8 @@ FsType fs_path_type(char const *path) { struct stat statbuf = {0}; - char linkbuf[8]; - if (readlink(path, linkbuf, sizeof linkbuf) != -1) { - // unfortunately there is no way of telling from stat alone whether a directory is a symbolic link >:( - return FS_LINK; - } if (stat(path, &statbuf) != 0) return FS_NON_EXISTENT; - if (S_ISLNK(statbuf.st_mode)) - return FS_LINK; if (S_ISREG(statbuf.st_mode)) return FS_FILE; if (S_ISDIR(statbuf.st_mode)) |