-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Directory listing should not show hidden or system files #1532
Comments
We do have logic that hides these files. The probable cause is tha the If you can figure out why it does not work, and/or what should be added, that would be great, as none of us has windows machine, it's hard to narrow down. |
@Carreau I looked at it and I think it might be because when comparing return value from Like this: _win32_FILE_ATTRIBUTE_HIDDEN = 0x02 | 0x04 # 0x04 means system file
# ...
if attrs > 0 and attrs & _win32_FILE_ATTRIBUTE_HIDDEN:
# ... |
I think that would only hide files that are both hidden and system. You probably need something like:
|
@takluyver ok, but hope the idea was correct |
Here's the list of file attribute constants: |
I think the idea is probably correct - I'm not very familiar with Windows file attributes, but it sounds reasonable. |
Hello again! I looked at it more, and noticed, that I was wrong. System files seems to be hidden also, so just checking if it has hidden attribute should work. But here the You should check here the |
Good catch, do you want to make a PR? |
Done. |
… system files See discussion on jupyter#1532.
… system files See discussion on jupyter#1532.
… system files See discussion on jupyter#1532.
I am currently in a situation where I would like the hidden files to be shown (at least certain ones), so that I could edit them in the Jupyter editor, or screenshot a directory listing showing a hidden file (which happens to be a configuration file I'd like to highlight). Is there any interest in a configuration option that would show hidden files? |
Hello,
if a file is hidden (or is system file) by operating system in OS's file browser, it should be hidden also in Jupyter's file / directory listing.
This happens at least on my Windows 8 system, when I launch notebook and go to browser, it shows hidden and system files in the listing.
The text was updated successfully, but these errors were encountered: