On Tue, Sep 22, 2020 at 10:56:43AM -0700, helhadad wrote: > Hi Folks, > I am trying to create file and write to it on a *network mapped drive*, > which I can access, create, delete and edit files using windows explorer or > CMD (Windows 10/Server 2016). > > You can find all details of the issue and response from other Go-Expert > below: > > https://stackoverflow.com/questions/63960049/writing-to-networked-mapped-drive-empty-files-or-failure > > I would appreciate if you enlighten me about the issue and how to solve it.
I would in particular highlight one weirdness discovered in [1]: when the OP did use forward slashes in their call to os.OpenFile, the error message read &os.PathError{Op:"write", Path:"H://00_SC//Dest01.txt", Err:0x57} that is, every forward slash in the input has been doubled. Another issue I can't fully grasp is why creating of the file goes well, and the error is only returned on the first call to Write on the returned file handle? Some folks suggested special dances are required in order to properly open a file on such a network share but this does not explain why plain commands like `copy` work in a cmd.exe session with that same resource attached by the `net use` command. (Kindly looking for soliciting any insight from Alex Brainman.) Is there a way to trace what happens on the system call level? 1. https://stackoverflow.com/questions/63960049#comment113160125_63960049 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20200924143320.7cdinhe4o3f5rsit%40carbon.