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

Hidden directory files now showing up in file shares (Windows) #23

Closed
Mutnick opened this issue Aug 27, 2016 · 11 comments
Closed

Hidden directory files now showing up in file shares (Windows) #23

Mutnick opened this issue Aug 27, 2016 · 11 comments
Labels

Comments

@Mutnick
Copy link
Member

Mutnick commented Aug 27, 2016

I have directories both with attrib +h and also that start with a dot. In the past this prevented sharing on both the official soulseek clients (which respect the attribute) and with nicotine+ (which in the past hid the .directories).

The hidden .directory files are now showing up in shares when running nicotine+ on windows.

@Mutnick
Copy link
Member Author

Mutnick commented Aug 27, 2016

This is both a privacy/security issue and a hassle as to actually prevent sharing I'd have to move such a directory out of it's normal location.

@ghost
Copy link

ghost commented Aug 27, 2016

Hi @Mutnick,

I can reintroduce this easily.
I will revert this commit tomorrow: 60deb70.

Btw I've not seen any code in the code base dealing with the +h attribute as far I know.
That would be the clean way of doing it in nicotine+ I agree.
I will have a look at it.

@ghost
Copy link

ghost commented Aug 27, 2016

Could you check this branch : https://github.com/gfarmerfr/nicotine-plus/tree/fix-hidden-directories-windows ?
I've reverted the commit so dot directories are excluded and on top of that I've added a check for the hidden attribute on Windows that will exclude those too.
Seems to work well on Win7.

@ghost ghost added the bug label Aug 28, 2016
@ghost ghost self-assigned this Aug 28, 2016
@Mutnick
Copy link
Member Author

Mutnick commented Aug 28, 2016

Could you check this branch : https://github.com/gfarmerfr/nicotine-plus/tree/fix-hidden-directories-windows ?

It appears a required module wasn't included:

ImportError: No module named win32file

@ghost
Copy link

ghost commented Aug 28, 2016

Yes I've just found it too. I had the 'pypiwin32' module installed which include win32file as a side effect of having pyinstaller on my Win7 box.
What do you think:
Should we make 'pypiwin32' a requirement on Windows ?
Or should we try to import it and do nothing if it fails (and loose the ability to hide attrib +h file) ?

@Mutnick
Copy link
Member Author

Mutnick commented Aug 28, 2016

I think for now it's adequate that .directory behavior is consistent across platforms and consistent with previous nicotine+ functionality: dot directories should be hidden.

It would be good to have that modules functionality for the additional checking, but yes make it optional.

@Mutnick
Copy link
Member Author

Mutnick commented Aug 28, 2016

Also if we eventually get to python 3.5 it looks a bit more straightforward without additional modules, see for example the is_hidden() here https://bugs.python.org/issue21719

@ghost
Copy link

ghost commented Aug 28, 2016

Yes it would be easier for sure :) Thx for the link.

Btw i've just updated the branch with the try/expect/else for the optional win32file.

@ghost
Copy link

ghost commented Aug 30, 2016

Hi @Mutnick

Have you tested the refreshed branch ? For me it works fine.
Can I go ahead and merged it ?

@Mutnick
Copy link
Member Author

Mutnick commented Aug 30, 2016

Yes this looks good, thanks.

@Mutnick Mutnick closed this as completed Aug 30, 2016
@ghost
Copy link

ghost commented Aug 30, 2016

Done. Thx :)

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

No branches or pull requests

1 participant