Commit 54dca7b7 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

revert diralphasort() tweak

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 2 additions and 8 deletions
+2 -8
...@@ -1965,9 +1965,8 @@ char *real_dir_from_tilde(const char *buf) ...@@ -1965,9 +1965,8 @@ char *real_dir_from_tilde(const char *buf)
} }
#if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER) #if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER)
/* Our sort routine for file listings. Sort directories before /* Our sort routine for file listings. Sort alphabetically and
* filenames, alphabetically and ignoring case differences. Sort * case-insensitively, and sort directories before filenames. */
* filenames the same way, except for ignoring an initial dot. */
int diralphasort(const void *va, const void *vb) int diralphasort(const void *va, const void *vb)
{ {
struct stat fileinfo; struct stat fileinfo;
...@@ -1981,11 +1980,6 @@ int diralphasort(const void *va, const void *vb) ...@@ -1981,11 +1980,6 @@ int diralphasort(const void *va, const void *vb)
if (!aisdir && bisdir) if (!aisdir && bisdir)
return 1; return 1;
if (*a == '.')
a++;
if (*b == '.')
b++;
return strcasecmp(a, b); return strcasecmp(a, b);
} }
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment