File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -519,9 +519,9 @@ function dtutils_file.file_copy(fromFile, toFile)
519519 local result = nil
520520 -- if cp exists, use it
521521 if dt .configuration .running_os == " windows" then
522- result = os.execute (' copy " ' .. fromFile .. ' " " ' .. toFile .. ' " ' )
522+ result = os.execute (' copy ' .. dtutils_file . sanitize_filename ( fromFile ) .. ' ' .. dtutils_file . sanitize_filename ( toFile ) )
523523 elseif dtutils_file .check_if_bin_exists (" cp" ) then
524- result = os.execute (" cp ' " .. fromFile .. " ' '" .. toFile .. " ' " )
524+ result = os.execute (" cp " .. dtutils_file . sanitize_filename ( fromFile ) .. ' ' .. dtutils_file . sanitize_filename ( toFile ) )
525525 end
526526
527527 -- if cp was not present, or if cp failed, then a pure lua solution
@@ -572,7 +572,7 @@ function dtutils_file.file_move(fromFile, toFile)
572572 if not success then
573573 -- an error occurred, so let's try using the operating system function
574574 if dtutils_file .check_if_bin_exists (" mv" ) then
575- success = os.execute (" mv ' " .. fromFile .. " ' '" .. toFile .. " ' " )
575+ success = os.execute (" mv " .. dtutils_file . sanitize_filename ( fromFile ) .. ' ' .. dtutils_file . sanitize_filename ( toFile ) )
576576 end
577577 -- if the mv didn't exist or succeed, then...
578578 if not success then
You can’t perform that action at this time.
0 commit comments