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

[win][fs] Can't open (fs.readdir) a relative path (".") #8245

Closed
AlttiRi opened this issue Jan 18, 2024 · 1 comment
Closed

[win][fs] Can't open (fs.readdir) a relative path (".") #8245

AlttiRi opened this issue Jan 18, 2024 · 1 comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs windows An issue that is known to occur on Windows

Comments

@AlttiRi
Copy link

AlttiRi commented Jan 18, 2024

What version of Bun is running?

1.0.23

What platform is your computer?

Window 10

What steps can reproduce the bug?

import fs from "node:fs/promises";
import path from "node:path";


const filePathAbs = "C:\\Downloads\\bun-windows-x64";
console.log(path.resolve(filePathAbs));
console.log(await fs.readdir(filePathAbs));

const filePathRel = ".";
console.log(path.resolve(filePathRel));
console.log(await fs.readdir(filePathRel));

What is the expected behavior?

C:\Downloads\bun-windows-x64
[ ".idea", "bun.exe", "x.mjs" ]
C:\Downloads\bun-windows-x64
[ ".idea", "bun.exe", "x.mjs" ]

What do you see instead?

C:\Downloads\bun-windows-x64
[ ".idea", "bun.exe", "x.mjs" ]
C:\Downloads\bun-windows-x64
ENOENT: No such file or directory
   errno: -2
 syscall: "open"
   path: "."

Additional information

No response

@AlttiRi AlttiRi added the bug Something isn't working label Jan 18, 2024
@Electroid Electroid added node.js Compatibility with Node.js APIs windows An issue that is known to occur on Windows labels Jan 18, 2024
@AlttiRi
Copy link
Author

AlttiRi commented Feb 14, 2024

Seems, it was fixed.

@AlttiRi AlttiRi closed this as completed Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs windows An issue that is known to occur on Windows
Projects
None yet
Development

No branches or pull requests

2 participants