From 13f5d37588372a2a01cfb5445f9d3594b83b32c6d5a05d3e8a8897008cbab26b Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Fri, 4 May 2018 17:49:47 +0000 Subject: [PATCH] Accepting request 604374 from home:wolfi323:test - Add 0001-Revert-Support-NTFS-hidden-files.patch to revert the new support for NTFS hidden files, it caused the mount point itself to be hidden (boo#1091780, kde#392913) I'd vote for Leap 15.0 as well... OBS-URL: https://build.opensuse.org/request/show/604374 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=221 --- 0001-Revert-Support-NTFS-hidden-files.patch | 91 +++++++++++++++++++++ kio.changes | 7 ++ kio.spec | 4 +- 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Support-NTFS-hidden-files.patch diff --git a/0001-Revert-Support-NTFS-hidden-files.patch b/0001-Revert-Support-NTFS-hidden-files.patch new file mode 100644 index 0000000..840aef6 --- /dev/null +++ b/0001-Revert-Support-NTFS-hidden-files.patch @@ -0,0 +1,91 @@ +From 3640475b0a8ea4a2eca060ed0bcf1f8f8da22375 Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer +Date: Fri, 4 May 2018 16:22:57 +0200 +Subject: [PATCH] Revert "Support NTFS hidden files" + +This reverts commit d7cce9937d5e9af2753fadb82d11f308b58bb8fa. + +The new support for NTFS hidden files causes the mountpoint itself +to be hidden as well, apparently the root directory of an NTFS +partition always has the "hidden" attribute set. + +https://bugs.kde.org/show_bug.cgi?id=392913 +http://bugzilla.opensuse.org/show_bug.cgi?id=1091780 +--- + src/ioslaves/file/file_unix.cpp | 54 ----------------------------------------- + 1 file changed, 54 deletions(-) + +diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp +index afa2bd3f..826c46cd 100644 +--- a/src/ioslaves/file/file_unix.cpp ++++ b/src/ioslaves/file/file_unix.cpp +@@ -37,9 +37,6 @@ + #include + + #include +-#if HAVE_SYS_XATTR_H +-#include +-#endif + #include + + #include +@@ -413,44 +410,6 @@ static bool isLocalFileSameHost(const QUrl &url) + return (QString::compare(url.host(), QLatin1String(hostname), Qt::CaseInsensitive) == 0); + } + +-#if HAVE_SYS_XATTR_H +-static bool isNtfsHidden(const QString &filename) +-{ +- constexpr auto attrName = "system.ntfs_attrib_be"; +- const auto filenameEncoded = QFile::encodeName(filename); +- auto length = getxattr(filenameEncoded.data(), attrName, nullptr, 0); +- if (length <= 0) { +- return false; +- } +- constexpr size_t xattr_size = 1024; +- char strAttr[xattr_size]; +- length = getxattr(filenameEncoded.data(), attrName, strAttr, xattr_size); +- if (length <= 0) { +- return false; +- } +- +- // Decode result to hex string +- static constexpr auto digits = "0123456789abcdef"; +- QVarLengthArray hexAttr(static_cast(length) * 2 + 4); +- char *c = strAttr; +- char *e = hexAttr.data(); +- *e++ ='0'; +- *e++ = 'x'; +- for (auto n = 0; n < length; n++, c++) { +- *e++ = digits[(static_cast(*c) >> 4)]; +- *e++ = digits[(static_cast(*c) & 0x0F)]; +- } +- *e = '\0'; +- +- // Decode hex string to int +- auto intAttr = static_cast(strtol(hexAttr.data(), nullptr, 16)); +- +- constexpr auto FILE_ATTRIBUTE_HIDDEN = 0x2u; +- return static_cast(intAttr & FILE_ATTRIBUTE_HIDDEN); +-} +-#endif +- +- + void FileProtocol::listDir(const QUrl &url) + { + if (!isLocalFileSameHost(url)) { +@@ -555,11 +506,6 @@ void FileProtocol::listDir(const QUrl &url) + + } else { + if (createUDSEntry(filename, QByteArray(ep->d_name), entry, details)) { +-#if HAVE_SYS_XATTR_H +- if (isNtfsHidden(filename)) { +- entry.insert(KIO::UDSEntry::UDS_HIDDEN, 1); +- } +-#endif + listEntry(entry); + } + } +-- +2.13.6 + diff --git a/kio.changes b/kio.changes index f56053c..3ad0399 100644 --- a/kio.changes +++ b/kio.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri May 4 14:39:14 UTC 2018 - wbauer@tmo.at + +- Add 0001-Revert-Support-NTFS-hidden-files.patch to revert the new + support for NTFS hidden files, it caused the mount point itself + to be hidden (boo#1091780, kde#392913) + ------------------------------------------------------------------- Sat Apr 14 13:19:04 CEST 2018 - lbeltrame@kde.org diff --git a/kio.spec b/kio.spec index b73f71d..8be4fe7 100644 --- a/kio.spec +++ b/kio.spec @@ -34,6 +34,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-% Source1: baselibs.conf # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 Patch0: kio_help-fallback-to-kde4-docs.patch +# PATCH-FIX-OPENSUSE +Patch1: 0001-Revert-Support-NTFS-hidden-files.patch BuildRequires: cmake >= 3.0 BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes @@ -125,7 +127,7 @@ Development files. %lang_package %prep %setup -q -%patch0 -p1 +%autopatch -p1 %build %cmake_kf5 -d build