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 @@ -522,9 +522,9 @@ function dtutils_file.file_copy(fromFile, toFile)
522522 local result = nil
523523 -- if cp exists, use it
524524 if dt .configuration .running_os == " windows" then
525- result = os.execute (' copy " ' .. fromFile .. ' " " ' .. toFile .. ' " ' )
525+ result = os.execute (' copy ' .. dtutils_file . sanitize_filename ( fromFile ) .. ' ' .. dtutils_file . sanitize_filename ( toFile ) )
526526 elseif dtutils_file .check_if_bin_exists (" cp" ) then
527- result = os.execute (" cp ' " .. fromFile .. " ' '" .. toFile .. " ' " )
527+ result = os.execute (" cp " .. dtutils_file . sanitize_filename ( fromFile ) .. ' ' .. dtutils_file . sanitize_filename ( toFile ) )
528528 end
529529
530530 -- if cp was not present, or if cp failed, then a pure lua solution
@@ -575,7 +575,7 @@ function dtutils_file.file_move(fromFile, toFile)
575575 if not success then
576576 -- an error occurred, so let's try using the operating system function
577577 if dtutils_file .check_if_bin_exists (" mv" ) then
578- success = os.execute (" mv ' " .. fromFile .. " ' '" .. toFile .. " ' " )
578+ success = os.execute (" mv " .. dtutils_file . sanitize_filename ( fromFile ) .. ' ' .. dtutils_file . sanitize_filename ( toFile ) )
579579 end
580580 -- if the mv didn't exist or succeed, then...
581581 if not success then
You can’t perform that action at this time.
0 commit comments