Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007564OCamlplatform support (windows, cross-compilation, etc)public2017-06-23 10:072017-07-19 00:05
Reporternojebar 
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.06.0 +dev/beta1/beta2/rc1 
Summary0007564: Unix.symlink does not support forward slashes under Windows
DescriptionIt appears that the target of native Windows symlinks (as created by Unix.symlink under Windows) *must* necessarily use backward slashes. Otherwise the native Windows APIs will think that the target does not exist.

As a compatibility layer, Unix.symlink should allow forward slashes in its argument.
Steps To Reproduce
$ cd /tmp
$ ocaml unix.cma
# Unix.mkdir "foo" 0o777;;
- : unit = ()
# close_out (open_out "foo/test.txt");;
- : unit = ()
# Unix.symlink "foo/test.txt" "foolink";;
- : unit = ()
# Unix.stat "foolink";;
Exception: Unix.Unix_error (Unix.ENOENT, "stat", "foolink").
# Unix.symlink "foo\\test.txt" "foolink2";;
- : unit = ()
# Unix.stat "foolink2";;
- : Unix.stats =
{Unix.st_dev = -427248956; st_ino = 2456; st_kind = Unix.S_REG;
 st_perm = 438; st_nlink = 1; st_uid = 0; st_gid = 0; st_rdev = -427248956;
 st_size = 0; st_atime = 1498204751.3015687; st_mtime = 1498204751.3015687;
 st_ctime = 1498204751.3015687}
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0017950)
nojebar (developer)
2017-06-23 10:18

https://blogs.msdn.microsoft.com/jeremykuhne/2016/04/21/path-normalization/ [^]
(0017952)
nojebar (developer)
2017-06-23 11:41

https://github.com/ocaml/ocaml/pull/1211 [^]
(0018006)
xleroy (administrator)
2017-06-27 16:08

See work in progress and discussion here: https://github.com/ocaml/ocaml/pull/1211 [^]

- Issue History
Date Modified Username Field Change
2017-06-23 10:07 nojebar New Issue
2017-06-23 10:18 nojebar Note Added: 0017950
2017-06-23 11:41 nojebar Note Added: 0017952
2017-06-27 16:08 xleroy Note Added: 0018006
2017-06-27 16:08 xleroy Status new => acknowledged
2017-07-19 00:05 frisch Status acknowledged => resolved
2017-07-19 00:05 frisch Fixed in Version => 4.06.0 +dev/beta1/beta2/rc1
2017-07-19 00:05 frisch Resolution open => fixed
2017-07-19 00:05 frisch Assigned To => frisch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker