aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r--src/nvim/os_unix.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c
index 82a43499b4..70cafc62ca 100644
--- a/src/nvim/os_unix.c
+++ b/src/nvim/os_unix.c
@@ -69,62 +69,6 @@ static int selinux_enabled = -1;
# include "os_unix.c.generated.h"
#endif
-#if defined(USE_FNAME_CASE)
-/*
- * Set the case of the file name, if it already exists. This will cause the
- * file name to remain exactly the same.
- * Only required for file systems where case is ignored and preserved.
- */
-void fname_case(
-char_u *name,
-int len /* buffer size, only used when name gets longer */
-)
-{
- char_u *slash, *tail;
- DIR *dirp;
- struct dirent *dp;
-
- FileInfo file_info;
- if (os_fileinfo_link((char *)name, &file_info)) {
- /* Open the directory where the file is located. */
- slash = vim_strrchr(name, '/');
- if (slash == NULL) {
- dirp = opendir(".");
- tail = name;
- } else {
- *slash = NUL;
- dirp = opendir((char *)name);
- *slash = '/';
- tail = slash + 1;
- }
-
- if (dirp != NULL) {
- while ((dp = readdir(dirp)) != NULL) {
- /* Only accept names that differ in case and are the same byte
- * length. TODO: accept different length name. */
- if (STRICMP(tail, dp->d_name) == 0
- && STRLEN(tail) == STRLEN(dp->d_name)) {
- char_u newname[MAXPATHL + 1];
-
- /* Verify the inode is equal. */
- STRLCPY(newname, name, MAXPATHL + 1);
- STRLCPY(newname + (tail - name), dp->d_name,
- MAXPATHL - (tail - name) + 1);
- FileInfo file_info_new;
- if (os_fileinfo_link((char *)newname, &file_info_new)
- && os_fileinfo_id_equal(&file_info, &file_info_new)) {
- STRCPY(tail, dp->d_name);
- break;
- }
- }
- }
-
- closedir(dirp);
- }
- }
-}
-#endif
-
#if defined(HAVE_ACL)
# ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>