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

Fails to open contained files when running on Windows #2

Closed
SoftPoison opened this issue Jan 21, 2023 · 0 comments · Fixed by #3 or SoftPoison/go-ext4-filesystem#1
Closed

Fails to open contained files when running on Windows #2

SoftPoison opened this issue Jan 21, 2023 · 0 comments · Fixed by #3 or SoftPoison/go-ext4-filesystem#1

Comments

@SoftPoison
Copy link
Contributor

The use of filepath.Separator in ext4/fs.go leads to the error "panic: open /<filename redacted>: invalid argument" when running on Windows (since its separator is \ instead of /)

I suggest changing instances of filepath.Separator to "/" (or vice versa; although / is a forbidden character anyway so it should be safe to just hardcode to /)

SoftPoison added a commit to SoftPoison/go-ext4-filesystem that referenced this issue Feb 4, 2023
This fixes an inconsistency when the library is used on Windows.

On Linux, the file path separator is "/", but on Windows it is "\". As
"/" is already hardcoded elsewhere, and "/" is a forbidden character in
file names and folders on Windows already, all instances have been
replaced with "/".

Closes masahiro331#2
masahiro331 pushed a commit that referenced this issue Feb 23, 2023
This fixes an inconsistency when the library is used on Windows.

On Linux, the file path separator is "/", but on Windows it is "\". As
"/" is already hardcoded elsewhere, and "/" is a forbidden character in
file names and folders on Windows already, all instances have been
replaced with "/".

Closes #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant