-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[ospaths] BUG: splitFile("/a.txt").dir = "" ; + other bugs with splitFile #8255
Labels
Comments
26 tasks
timotheecour
changed the title
[ospaths] BUG: splitFile("/a.txt") returns (dir: "", name: "a", ext: ".txt")
[ospaths] BUG: splitFile("/a.txt").dir = "" ; + other bugs with splitFile
Jul 10, 2018
timotheecour
changed the title
[ospaths] BUG: splitFile("/a.txt").dir = "" ; + other bugs with splitFile
[ospaths] BUG: splitFile("/a.txt").dir = "" ; + other bugs with splitFile, parentDir
Jul 10, 2018
Bug 1 is documented behaviour and encoded in the return type! |
I think bug 1 is about dir, which should be |
yes, that is the bug I'm referring to |
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Dec 19, 2018
This was referenced Dec 19, 2018
timotheecour
changed the title
[ospaths] BUG: splitFile("/a.txt").dir = "" ; + other bugs with splitFile, parentDir
[ospaths] BUG: splitFile("/a.txt").dir = "" ; + other bugs with splitFile
Dec 19, 2018
=> PR to fix it: #10047 |
timotheecour
added a commit
that referenced
this issue
Dec 20, 2018
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Dec 20, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nim:
echo splitFile("/a.txt")
(dir: "", name: "a", ext: ".txt") #definitely wrong
python:
os.path.split("/a.txt")
('/', 'a.txt')
nim:
echo splitFile("a/")
(dir: "a/", name: "", ext: "") # violates good sense, and also documention: "dir does not end in DirSep. extension includes the leading dot."
python:
os.path.split("a/")
('a', '')
echo splitFile("a/..")
(dir: "a", name: ".", ext: ".")
should be:
(dir: "a", name: "..")
The text was updated successfully, but these errors were encountered: