diff --git a/contrib/de_DE/LC_MESSAGES/gimp.po b/contrib/de_DE/LC_MESSAGES/gimp.po index 4621455..5c90119 100644 --- a/contrib/de_DE/LC_MESSAGES/gimp.po +++ b/contrib/de_DE/LC_MESSAGES/gimp.po @@ -36,4 +36,4 @@ msgstr "Starten von GIMP" #: gimp.lua:243 msgid "Edit with GIMP" -msgstr "Bearbeiten mit Gimp" +msgstr "Bearbeiten mit GIMP" diff --git a/contrib/gimp.lua b/contrib/gimp.lua index 6a825a0..b66f60f 100644 --- a/contrib/gimp.lua +++ b/contrib/gimp.lua @@ -112,15 +112,15 @@ local function checkIfBinExists(bin) return ret end -local function checkIfFileExists(filepath) - local handle = io.popen("ls "..filepath) - local result = handle:read() +-- Thanks Tobias Jakobs for the idea and the correction +function checkIfFileExists(filepath) + local file = io.open(filepath,"r") local ret - handle:close() - if (result) then + if file ~= nil then + io.close(file) dt.print_error("true checkIfFileExists: "..filepath) ret = true - else + else dt.print_error(filepath.." not found") ret = false end