Skip to content

Commit a81d992

Browse files
authored
On Windows we don't need anything to open a file
On Windows we don't need any command to open a file. And "start" has problems with spaces in the filename, even if we put quoter around them: https://stackoverflow.com/questions/13691827/opening-file-with-spaces-in-windows-via-command-prompt
1 parent eb13518 commit a81d992

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dtutils/system.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ dtutils_system.libdoc.functions["launch_default_app"] = {
122122
function dtutils_system.launch_default_app(path)
123123
local open_cmd = "xdg-open "
124124
if (dt.configuration.running_os == "windows") then
125-
open_cmd = "start "
125+
open_cmd = "" -- On Windows we don't need any command. (start e.g. has problems with spaces in the filename, even if we put quoter around them.) https://stackoverflow.com/questions/13691827/opening-file-with-spaces-in-windows-via-command-prompt
126126
elseif (dt.configuration.running_os == "macos") then
127127
open_cmd = "open "
128128
end
129129
return dtutils_system.external_command(open_cmd .. path)
130130
end
131131

132132

133-
return dtutils_system
133+
return dtutils_system

0 commit comments

Comments
 (0)