Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide all the directories starting with '.' in index #51

Open
brx75 opened this issue Oct 18, 2016 · 2 comments
Open

Hide all the directories starting with '.' in index #51

brx75 opened this issue Oct 18, 2016 · 2 comments

Comments

@brx75
Copy link

brx75 commented Oct 18, 2016

Hi,
I've seen that the "Index" only hides dot folders in the notes 'root' directory. It may be possible for some hidden folders to be present deeper in the hierarchy.

That folders should be hidden too.

@brx75
Copy link
Author

brx75 commented Oct 18, 2016

I've produced a one line patch to achieve this:

--- notes_index.py.original 2016-10-18 18:06:35.923293313 +0200
+++ notes_index.py  2016-10-18 18:05:53.355548452 +0200
@@ -50,7 +50,7 @@
             level = root.replace(path, '').count(os.sep) - 1
             indent = ' ' * TAB_SIZE * (level)
             relpath = os.path.relpath(root, path)
-            if not relpath.startswith("."):
+            if relpath.find("/.") < 0 and not relpath.startswith("."):
                 line_str = u'{0}▣ {1}'.format(indent, os.path.relpath(root, path))
                 lines.append((line_str, root))
             if relpath.startswith(settings().get("archive_dir")):

@brx75 brx75 closed this as completed Oct 18, 2016
@brx75 brx75 reopened this Oct 18, 2016
@fk128
Copy link
Collaborator

fk128 commented Oct 19, 2016

create a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants