Text editor: refresh path on saving file (#11396)

File size was changed.
This commit is contained in:
hius07 authored and GitHub committed 2024-01-21 11:11:16 +01:00
1 parent 75ffc3bb76
commit f246b3d19c
1 file changed
+5 -4
+5 -4
View File
@@ -493,10 +493,11 @@ function TextEditor:readFileContent(file_path)
end
function TextEditor:saveFileContent(file_path, content)
local file, err = io.open(file_path, "wb")
if file then
file:write(content)
file:close()
local ok, err = util.writeToFile(content, file_path)
if ok then
if self.ui.file_chooser then
self.ui.file_chooser:refreshPath()
end
logger.info("TextEditor: saved file", file_path)
return true
end