Skip to content

Commit af4e388

Browse files
authored
check result from io.popen("xdg-user-dir VIDEOS")
1 parent d3742bb commit af4e388

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/video_mencoder.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ local df = require "lib/dtutils.file"
3535
require "official/yield"
3636
local gettext = dt.gettext
3737

38-
dt.configuration.check_version(...,{2,0,1},{3,0,0},{4,0,0})
38+
dt.configuration.check_version(...,{2,0,1},{3,0,0},{4,0,0},{5,0,0})
3939

4040
-- Tell gettext where to find the .mo file translating messages for a particular domain
4141
gettext.bindtextdomain("video_mencoder",dt.configuration.config_dir.."/lua/locale/")
@@ -107,6 +107,9 @@ dt.preferences.register("video_mencoder", "OpenVideo", "bool", "Video exort (MEn
107107
local handle = io.popen("xdg-user-dir VIDEOS")
108108
local result = handle:read()
109109
handle:close()
110+
if (result == nil) then
111+
result = ""
112+
end
110113
dt.preferences.register("video_mencoder", "ExportDirectory", "directory", "Video exort (MEncoder): Video export directory","A directory that will be used to export a Video",result)
111114

112115
-- Get the MEncoder codec list with: mencoder -ovc help

0 commit comments

Comments
 (0)