From f31bb80b8b253d2a1caf685cb2ea5b79cf1ead04 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Mon, 30 May 2022 10:41:01 +0200 Subject: [PATCH] mc-4.8.28-2.fc37 - fix file sort by version - Resolves: #2091504 Signed-off-by: Jindrich Novy --- ...726b79d35481e96f5fabe8e34e3439e6d9d9.patch | 31 +++++++++++++++++++ mc.spec | 7 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch diff --git a/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch b/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch new file mode 100644 index 0000000..292ab0b --- /dev/null +++ b/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch @@ -0,0 +1,31 @@ +From db109be8a28f1556495979ee7d1967e982cca6fd Mon Sep 17 00:00:00 2001 +From: Andrew Borodin +Date: Mon, 23 May 2022 20:52:30 +0300 +Subject: [PATCH] Ticket #4374: fix file sort by version. + +Signed-off-by: Andrew Borodin +--- + src/filemanager/dir.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/filemanager/dir.c b/src/filemanager/dir.c +index 5862da6f9c..65a80cf12f 100644 +--- a/src/filemanager/dir.c ++++ b/src/filemanager/dir.c +@@ -358,7 +358,15 @@ sort_vers (file_entry_t * a, file_entry_t * b) + int bd = MY_ISDIR (b); + + if (ad == bd || panels_options.mix_all_files) +- return filevercmp (a->fname->str, b->fname->str) * reverse; ++ { ++ int result; ++ ++ result = filevercmp (a->fname->str, b->fname->str); ++ if (result != 0) ++ return result * reverse; ++ ++ return sort_name (a, b); ++ } + + return bd - ad; + } diff --git a/mc.spec b/mc.spec index ef7da17..1f0f6d1 100644 --- a/mc.spec +++ b/mc.spec @@ -4,7 +4,7 @@ Summary: User-friendly text console file manager and visual shell Name: mc Epoch: 1 Version: 4.8.28 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ URL: http://www.midnight-commander.org/ Source0: https://github.com/MidnightCommander/mc/archive/%{version}.tar.gz @@ -12,6 +12,7 @@ Patch1: %{name}-spec.syntax.patch Patch3: %{name}-python3.patch Patch4: %{name}-default_setup.patch Patch5: %{name}-tmpdir.patch +Patch6: https://github.com/MidnightCommander/mc/commit/34d3726b79d35481e96f5fabe8e34e3439e6d9d9.patch # deps for autogen.sh BuildRequires: make BuildRequires: autoconf @@ -103,6 +104,10 @@ sed -i "s,PREV_MC_VERSION=\"unknown\",PREV_MC_VERSION=\"%{version}\"," version.s %{_libexecdir}/mc/extfs.d/{s3+,uc1541} %changelog +* Mon May 30 2022 Jindrich Novy - 1:4.8.28-2 +- fix file sort by version +- Resolves: #2091504 + * Fri Apr 29 2022 Jindrich Novy - 1:4.8.28-1 - update to https://github.com/MidnightCommander/mc/releases/tag/v4.8.28 - Related: #1993686