Skip to content
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: Windows Symlink support #5750

Closed
gopherbot opened this issue Jun 21, 2013 · 14 comments
Closed

os: Windows Symlink support #5750

gopherbot opened this issue Jun 21, 2013 · 14 comments
Milestone

Comments

@gopherbot
Copy link

by raul.san@sent.com:

It is supposed that every function in package os is platform-independentand and work in
every system, but os.Symlink has not been implemented in Windows.

Symbolic Links
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365680.aspx

Related to: https://groups.google.com/forum/#!topic/golang-nuts/fSjM8aga_6Y
@bradfitz
Copy link
Contributor

Comment 1:

Maybe. Symlinks aren't very common at least on Windows, and I imagine most Windows tools
would be confused by them.
I think returning an error on Windows is an acceptable implementation. But leaving open
here for tracking.

Labels changed: added priority-later, os-windows, removed priority-triage.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

Comment 2:

Maybe. Symlinks aren't very common at least on Windows, and I imagine most Windows tools
would be confused by them.
I think returning an error on Windows is an acceptable implementation. But leaving open
here for tracking.

@gopherbot
Copy link
Author

Comment 3 by raul.san@sent.com:

"Symlinks aren't very common at least on Windows, and I imagine most Windows tools would
be confused by them."
When you built a cross-system application, you expect that it works in every system; and
since Windows enables symlinks I don't see a real issue to add its usage from Go.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 4:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added repo-main.

@bradfitz
Copy link
Contributor

Comment 7:

https://golang.org/cl/86160044/ doesn't reference this issue, but should.

@bradfitz
Copy link
Contributor

Comment 8:

Labels changed: added release-go1.4, removed release-none.

@bradleypeabody
Copy link

Comment 9:

fwiw: https://gist.github.com/bradleypeabody/10572010
I personally feel that the Windows symlink functionality is lame and it is not
surprising that nobody wants to mess with this feature (the fact that symlink creation
requires administrator privileges by default is especially annoying).  However, the
above does seem work (bar possibly some edge cases I'm not aware of) and could be used
as the basis for an implementation.

@minux
Copy link
Member

minux commented Apr 27, 2014

Comment 10:

Issue #7878 has been merged into this issue.

@gopherbot
Copy link
Author

Comment 11 by Ivan.Volosyuk:

Closed as duplicate issue #7878 is about hard links. I have a patch to fix this.
May be hardlinks are not common in both windows and linux, but they are implemented for
go/linux and it makes harder to port linux code to windows if there is inconsistent
implementation.

Attachments:

  1. fix.patch (1531 bytes)

@ianlancetaylor
Copy link
Contributor

Comment 12:

Note that patches in bug reports will be lost.  Please see
http://golang.org/doc/contribute.html.  Thanks.

@gopherbot
Copy link
Author

Comment 13:

CL https://golang.org/cl/86160044 mentions this issue.

@alexbrainman
Copy link
Member

Comment 14:

This issue was closed by revision cf521ce.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Fixes golang#5750.

https://code.google.com/p/go/issues/detail?id=5750

os: Separate windows from posix. Implement windows support.
path/filepath: Use the same implementation as other platforms
syscall: Add/rework new APIs for Windows

LGTM=alex.brainman
R=golang-codereviews, alex.brainman, gobot, rsc, minux
CC=golang-codereviews
https://golang.org/cl/86160044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Fixes golang#5750.

https://code.google.com/p/go/issues/detail?id=5750

os: Separate windows from posix. Implement windows support.
path/filepath: Use the same implementation as other platforms
syscall: Add/rework new APIs for Windows

LGTM=alex.brainman
R=golang-codereviews, alex.brainman, gobot, rsc, minux
CC=golang-codereviews
https://golang.org/cl/86160044
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants