We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1ec9cfb + 635ea3f commit 3f5cf06Copy full SHA for 3f5cf06
lib/dtutils/file.lua
@@ -230,7 +230,7 @@ function dtutils_file.check_if_file_exists(filepath)
230
local result = false
231
if (dt.configuration.running_os == 'windows') then
232
filepath = string.gsub(filepath, '[\\/]+', '\\')
233
- local p = io.popen("if exist " .. filepath .. " (echo 'yes') else (echo 'no')")
+ local p = io.popen("if exist " .. dtutils_file.sanitize_filename(filepath) .. " (echo 'yes') else (echo 'no')")
234
local ans = p:read("*all")
235
p:close()
236
if string.match(ans, "yes") then
0 commit comments