-
Notifications
You must be signed in to change notification settings - Fork 93
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
Faked os.makedirs
differs from the built-in os.makedirs
and mkdir -p
#987
Comments
I tried to fix this yesterday, and it worked under Linux, but not under Windows (that is, my test didn't, which had more directories as base, yours did). I did not understand yet the real behavior under Windows - it is somewhat more permissive than under Linux, but not always. I will probably not be able to fix this in the next couple of weeks, as I have near to no free time now, and will be away afterwards. I guess I will find more of your issues when I get back :) |
I actually had made a testing error, so this should be good now. |
@vector-of-bool - I'm back, did you have the the time to test some more? I'm inclined to make a new release if nothing else comes up. |
I've been bouncing between (side) projects and haven't had a chance to test this one yet. I'll try to get back on this one sooner than later. |
I'll probably make a release at the weekend anyway, if you don't get the time to test it. There have been some fixes accumulated that are worth publishing, and we can always make patch releases if something else comes up. |
Describe the bug
os.makedirs
andmkdir -p
both do a "weird" thing when they create directory trees:That is:
base/
if absent, then entersbase/
foo/
if absent, then enterfoo/
../
if absent (it is never absent on "normal" filesystems), then enters../
(sending it back intobase/
)bar/
(
os.makedirs
does the same thing.)pyfakefs
'sos.makedirs
normalizes the path before it does the above process, meaning thefoo
and..
parts will be chopped out of the path, and thefoo/
directory will not be created.How To Reproduce
Your environment
Please run the following in the environment where the problem happened and
paste the output.
The text was updated successfully, but these errors were encountered: