WSL icon indicating copy to clipboard operation
WSL copied to clipboard

create file should fail when the file name has trailing slash

Open mzzzoozz opened this issue 10 years ago • 5 comments

On linux, create file should fail when the file name has trailing slash. But on WSL, it doesn't

Example:

include <stdio.h>

include <sys/types.h>

include <fcntl.h>

include <sys/stat.h>

int main() { int rtn = open("./tttt/", O_CREAT | O_TRUNC, 0644); printf("create rtn %d\n", rtn); return 0; }

mzzzoozz avatar Jun 15 '16 15:06 mzzzoozz

Thanks for reporting this, this is definitely a bug. I'll look into the right way to fix this.

benhillis avatar Jun 15 '16 16:06 benhillis

This was fixed recently in our dev branch and the fix will be in an upcoming Windows Insider build.

benhillis avatar Jun 15 '16 16:06 benhillis

This sounds kind of like the inverse of #432 ; has that also been addressed?

aseering avatar Jun 15 '16 19:06 aseering

@aseering I believe that you are right. I just tried the repro in #432 and verified that I was able to run the configure script and run make afterwards without errors. I will update the status of that thread as well.

benhillis avatar Jun 15 '16 19:06 benhillis

This is fixed in Build 14371. Please reopen if you continue to see issues.

benhillis avatar Jul 08 '16 15:07 benhillis