Rename "rotten" to "broken" symlinks in completions as well

Now consistent again with cd - eae9ee7f35.
This commit is contained in:
Fabian Homborg 2021-11-19 20:51:48 +01:00
parent c78b7b07e7
commit c82ce5132b
2 changed files with 3 additions and 3 deletions

View File

@ -412,7 +412,7 @@ static const wchar_t *file_get_desc(int lstat_res, const struct stat &lbuf, int
return COMPLETE_SYMLINK_DESC;
}
if (err == ENOENT) return COMPLETE_ROTTEN_SYMLINK_DESC;
if (err == ENOENT) return COMPLETE_BROKEN_SYMLINK_DESC;
if (err == ELOOP) return COMPLETE_LOOP_SYMLINK_DESC;
// On unknown errors we do nothing. The file will be given the default 'File'
// description or one based on the suffix.
@ -453,7 +453,7 @@ static bool wildcard_test_flags_then_complete(const wcstring &filepath, const wc
stat_res = wstat(filepath, &stat_buf);
if (stat_res < 0) {
// In order to differentiate between e.g. rotten symlinks and symlink loops, we also
// In order to differentiate between e.g. broken symlinks and symlink loops, we also
// need to know the error status of wstat.
stat_errno = errno;
}

View File

@ -26,7 +26,7 @@
/// Description for symlink.
#define COMPLETE_DIRECTORY_SYMLINK_DESC _(L"dir symlink")
/// Description for Rotten symlink.
#define COMPLETE_ROTTEN_SYMLINK_DESC _(L"rotten symlink")
#define COMPLETE_BROKEN_SYMLINK_DESC _(L"broken symlink")
/// Description for symlink loop.
#define COMPLETE_LOOP_SYMLINK_DESC _(L"symlink loop")
/// Description for socket files.