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.
1 parent c46dce5 commit e684c89Copy full SHA for e684c89
scen_edit/command/project/copy_custom_project_files_command.lua
@@ -26,8 +26,15 @@ function CopyCustomProjectFilesCommand:execute()
26
Spring.CreateDir(destDir)
27
28
local srcFileContent = VFS.LoadFile(srcPath, VFS.RAW)
29
- local destFile = assert(io.open(destPath, "w"))
30
- destFile:write(srcFileContent)
31
- destFile:close()
+
+ -- TODO: Do this in JS where this isn't a problem and no crappy workaround is necessary.
+ xpcall(function()
32
+ local destFile = assert(io.open(destPath, "w"))
33
+ destFile:write(srcFileContent)
34
+ destFile:close()
35
+ end, function(err)
36
+ Log.Error(debug.traceback(err, 3))
37
+ Log.Error("Error copying project file " .. destPath .. " . Consider including it manually")
38
+ end)
39
end)
40
end
0 commit comments