mirror of
https://github.com/osnr/TabFS.git
synced 2024-06-19 22:25:04 +02:00
extension: also remove spaces; spaces in filenames are annoying, imo
This commit is contained in:
parent
636a975818
commit
922e2bb6a3
|
@ -35,6 +35,9 @@ function pathComponent(path, i) {
|
||||||
const sanitize = (function() {
|
const sanitize = (function() {
|
||||||
// from https://github.com/parshap/node-sanitize-filename/blob/209c39b914c8eb48ee27bcbde64b2c7822fdf3de/index.js
|
// from https://github.com/parshap/node-sanitize-filename/blob/209c39b914c8eb48ee27bcbde64b2c7822fdf3de/index.js
|
||||||
|
|
||||||
|
// I've added ' ' to the list of illegal characters. it's a
|
||||||
|
// decision whether we want to allow spaces in filenames... I think
|
||||||
|
// they're annoying, so I'm sanitizing them out for now.
|
||||||
var illegalRe = /[\/\?<>\\:\*\|" ]/g;
|
var illegalRe = /[\/\?<>\\:\*\|" ]/g;
|
||||||
var controlRe = /[\x00-\x1f\x80-\x9f]/g;
|
var controlRe = /[\x00-\x1f\x80-\x9f]/g;
|
||||||
var reservedRe = /^\.+$/;
|
var reservedRe = /^\.+$/;
|
||||||
|
|
Loading…
Reference in a new issue