revert diralphasort() tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
0df875a45d
commit
54dca7b7b3
10
src/files.c
10
src/files.c
|
@ -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)
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue