isaacs / node-tar

tar for node
ISC License
837 stars 183 forks source link

[QUESTION] filename '\' #358

Closed vashian closed 1 year ago

vashian commented 1 year ago

Is there an existing issue for this?

Current Behavior

Hi I have a file with the name: \

image

Using the command tar -czvf <filename> <location> everything is ok and I can extract it without any problem but when I use the node-tar package and create .tar.gz file I couldn't extract it.

Node-tar version: 6.1.13

Expected Behavior

No response

Steps To Reproduce

No response

Environment

isaacs commented 1 year ago

That's a tricky one, because an explicit goal of this implementation is to work as identically as possible across win32 and posix platforms.

On windows, \ is not a valid filename, it's a path separator. So I don't really see a way to support this in node-tar, without abandoning that portability.

Can I ask what you use that file for?