-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: Create does not return error on filename with colon(:) on Windows #13035
Comments
I think what you are seeing is NTFS alternative files streams, you've created a file called test, and in the alternative stream the sting "testing" is written. I think windows explorer doesn't show this properly, but should be able to reopen the same file you created and check for the contents. http://blogs.technet.com/b/askcore/archive/2013/03/24/alternate-data-streams-in-ntfs.aspx
|
Wow, that's just eye opening, thanks so much for the response. By opening the file using the same file name, I can read back the same content. Since it's a platform-specific feature instead, I will close the issue. |
I think we'll have to chalk this up to a feature :) It's only available on Windows, using NTFS.
|
What version of Go are you using (go version)?
go version go1.5.1 windows/386
What operating system and processor architecture are you using?
Windows 7 64-bit
What did you do?
Sorry for not using playground, still got 403 in Hong Kong.
What did you expect to see?
:
is invalid character for file name on Windows.Expected error on
os.Create
orf.Write
.What did you see instead?
An empty file named
test
is created after running the program, without any errors returned.The text was updated successfully, but these errors were encountered: