Skip to content

Add support for recognition and handling of Windows junctions.#5

Open
cb109 wants to merge 1 commit into
4degrees:masterfrom
cb109:feat/windows-junction-support
Open

Add support for recognition and handling of Windows junctions.#5
cb109 wants to merge 1 commit into
4degrees:masterfrom
cb109:feat/windows-junction-support

Conversation

@cb109

@cb109 cb109 commented Aug 16, 2014

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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.

Comment thread source/riffle/model.py
try:
os.listdir(path)
accessDenied = False
except WindowsError as e:

Copy link
Copy Markdown

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 ;)

@cb109 cb109 Jun 30, 2016

Copy link
Copy Markdown
Contributor Author

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