Skip to content

Commit e7dbd6e

Browse files
committed
lib/dtutils/string - fixed constant names to correctly define the
patterns as the unsafe filename characters.
1 parent 1b5cb1a commit e7dbd6e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/dtutils/string.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,12 @@ end
306306
local function _should_be_sanitized(str)
307307
local old_log_level = log.log_level()
308308
local result = false
309-
local SAFE_POSIX_FILENAME_CHARS <const> = "[^%w/._%-]+"
310-
local SAFE_WIN_FILENAME_CHARS <const> = "[^%w\\._%-:]+"
309+
local UNSAFE_POSIX_FILENAME_CHARS <const> = "[^%w/._%-]+"
310+
local UNSAFE_WIN_FILENAME_CHARS <const> = "[^%w\\._%-:]+"
311311

312-
local pattern = SAFE_POSIX_FILENAME_CHARS
312+
local pattern = UNSAFE_POSIX_FILENAME_CHARS
313313
if dt.configuration.running_os == "windows" then
314-
pattern = SAFE_WIN_FILENAME_CHARS
314+
pattern = UNSAFE_WIN_FILENAME_CHARS
315315
end
316316

317317
log.log_level(dtutils_string.log_level)

0 commit comments

Comments
 (0)