Why does tmp remove quotes from paths ?
See original GitHub issueOperating System
- Linux
- Windows 7
- Windows 10
- MacOS
- other:
NodeJS Version
- 0.x
- 4.x
- 6.x
- 7.x
- other:
Tmp Version
0.2.1
Expected Behavior
Don’t remove quotes from paths
Experienced Behavior
Quotes are being removed
See https://github.com/raszi/node-tmp/blob/master/lib/tmp.js#L564-L575
For example on Windows the tmpdir is in general in C:\Users\username\AppData\Local\Temp
. A username may contain a quote and / or a double quote (Bob's Computer
for example).
_getTmpName
calls _sanitizeName
on os.tmpdir()
and returns a folder that does not exist.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Resolved - No Such File or Directory. No .tmp files - Unity Forum
), this issue is caused by the presence of a single-quote character (') or double-quote character (") in the paths used by the...
Read more >bash - Remove line in a file in similar found in a list - Stack Overflow
Hello, first cat did nothing, the second almost worked, it only deleted the last line with the .tmp, and if I add the...
Read more >linux - Are we supposed to manually delete the contents of /tmp?
To answer the questions: Is /tmp supposed to be emptied automatically: Yes; Are we supposed to delete Files in /tmp regularly and manually: ......
Read more >Advanced Quoting in Shell Scripts - Scripting OS X
But when you put the ~ in the quotes, it will not be substituted to the user's home directory path. There are a...
Read more >DeleteFiles@1 - Delete files v1 task - Microsoft Learn
The file/folder paths to delete. Supports multiple lines of minimatch patterns; each one is processed before moving onto the next line.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright, keep your bugs then.
This is not true, you can create users with ampersands and quotes in the username on Windows 10, these characters will remain in the folder name on the filesystem.
There was at least me, the author of #246 and a thumbs up above.
And thus pointing to files or directories that do not exist.
Just want to chime in with my “complaint.” This is causing issues for us as some Windows users have apostrophes in their profile name, leading to temp file paths with nonexistent directories when using this library.