Skip to content

Conversation

@cb109
Copy link
Contributor

@cb109 cb109 commented Aug 16, 2014

Hi Martin,

When I gave riffle a try on my Windows 7 machine, it failed for folders like 'C:\Documents and Settings' or 'C:\Users\USER\Cookies' with 'Windows Error 5: Access denied'. This happens because these folders are junctions that are softlinked to other, real directories. I added support for them (using existing functionality from jaraco.windows) and thought it may be worth sharing. Feel free to decline in case you don't fancy it, had fun writing it anyway ;)

Cheers,
Christoph

@martinpengellyphillips
Copy link

Great - thanks!

I'll just do some additional testing and make sure it doesn't affect other platforms, but it seems like a useful addition.

try:
os.listdir(path)
accessDenied = False
except WindowsError as e:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

careful about this exception, as it does exist only under windows....
just discovered at my expenses ;)

Copy link
Contributor Author

@cb109 cb109 Jun 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. It should probably be OSError then instead, from which WindowsError is a subclass.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants