Skip to content

Replace symbolic link judgement in _IOFile.protected#29

Merged
johanneskoester merged 1 commit intosnakemake:masterfrom
smatsumt:fix/#10-wong-ProtectedOutputException
Oct 14, 2019
Merged

Replace symbolic link judgement in _IOFile.protected#29
johanneskoester merged 1 commit intosnakemake:masterfrom
smatsumt:fix/#10-wong-ProtectedOutputException

Conversation

@smatsumt
Copy link
Copy Markdown
Contributor

os.access() in MacOS has incorrect behavior with follow_symlinks=False, so replaces yet another symbolic link judgement.

os.path.islink() returns True if the file is symbolic link.
https://docs.python.org/3/library/os.path.html#os.path.islink

islink() returns False in the environment which does not support symbolic link (does not raise Exception)
And actually, it can treat files, not only directories.

In detail, please refer the issue #10

MacOS has incorrect behavior with follow_symlinks=False
see snakemake#10
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 13, 2019

Codecov Report

Merging #29 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
- Coverage   61.16%   61.14%   -0.02%     
==========================================
  Files          55       55              
  Lines       11862    11862              
==========================================
- Hits         7255     7253       -2     
- Misses       4607     4609       +2
Impacted Files Coverage Δ
snakemake/io.py 81.59% <100%> (ø) ⬆️
snakemake/benchmark.py 90.24% <0%> (-0.61%) ⬇️
snakemake/scheduler.py 87.5% <0%> (-0.42%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44206be...89dea08. Read the comment docs.

Copy link
Copy Markdown
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

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

Thanks for the quick and reasonable fix!

@johanneskoester johanneskoester merged commit 59846dd into snakemake:master Oct 14, 2019
@smatsumt smatsumt deleted the fix/#10-wong-ProtectedOutputException branch October 14, 2019 09:53
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

Successfully merging this pull request may close these issues.

2 participants