[Xfce4-commits] [apps/catfish] 01/01: Improve hidden file logic (bug #14497)
noreply at xfce.org
noreply at xfce.org
Sat Jun 30 04:10:30 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/catfish.
commit 8b3fe1149562195b33f73825db21e231caa5aea7
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Jun 29 22:10:23 2018 -0400
Improve hidden file logic (bug #14497)
---
catfish/CatfishWindow.py | 10 +++++-----
po/catfish.pot | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/catfish/CatfishWindow.py b/catfish/CatfishWindow.py
index 99d0fe3..b2d5ed0 100644
--- a/catfish/CatfishWindow.py
+++ b/catfish/CatfishWindow.py
@@ -61,12 +61,12 @@ def application_in_PATH(application_name):
def is_file_hidden(folder, filename):
"""Return TRUE if file is hidden or in a hidden directory."""
- relative = filename.lstrip(folder)
- splitpath = os.path.split(relative)
- while splitpath[1] != '':
- if splitpath[1][0] == '.':
+ folder = os.path.abspath(folder)
+ filename = os.path.abspath(filename)
+ relpath = os.path.relpath(filename, folder)
+ for piece in relpath.split(os.sep):
+ if piece.startswith("."):
return True
- splitpath = os.path.split(splitpath[0])
return False
diff --git a/po/catfish.pot b/po/catfish.pot
index ce14cb3..c9232aa 100644
--- a/po/catfish.pot
+++ b/po/catfish.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-06-29 21:38-0400\n"
+"POT-Creation-Date: 2018-06-29 22:09-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list