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

FileUtil.mkdir and relative path on win32 #22

Open
gildor478 opened this issue Oct 24, 2020 · 0 comments
Open

FileUtil.mkdir and relative path on win32 #22

gildor478 opened this issue Oct 24, 2020 · 0 comments
Labels

Comments

@gildor478
Copy link
Owner

This bug has been migrated from artifact #668 on forge.ocamlcore.org. It was assigned to user102.

user116 posted on 2010-06-18 08:39:43:

    Objective Caml version 3.11.0

#use "topfind";;

  • : unit = ()
    Findlib has been successfully loaded. Additional directives:

  • : unit = ()

#require "fileutils";;

C:\my\ocaml\lib: added to search path
C:/my/ocaml/lib\unix.cma: loaded
c:\my\ocaml-3.11.0\lib\site-lib\fileutils: added to search path
c:\my\ocaml-3.11.0\lib\site-lib\fileutils\fileutils.cma: loaded

FileUtil.all_upper_dir "a\b";;

Exception: FilePath.EmptyFilename.

^Z

Hence mkdir "a\b" will also raise this exception.

user102 replied on 2010-06-18 09:08:48:

all_upper_dir should not be used -- though I don't enforce it through a .mli file. Something that should be done ;-)

Here are the step to reproduce your bug:

#require "fileutil";;

No such package: fileutil

#require "fileutils";;

/usr/lib/ocaml/unix.cma: loaded
/usr/lib/ocaml/fileutils: added to search path
/usr/lib/ocaml/fileutils/fileutils.cma: loaded

FilePath.Win32Path.dirname "a\b";;

  • : FilePath.Win32Path.filename = "a"

FilePath.Win32Path.dirname "a";;

  • : FilePath.Win32Path.filename = ""

FilePath.Win32Path.dirname "";;

Exception: FilePath.EmptyFilename.

Thanks for the bug report.

@gildor478 gildor478 added the bug label Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant