Replaced checkIfFileExists with supertobi's fix and capitalized GIMP in gimp.po where I missed it.

This commit is contained in:
Bill Ferguson
2016-04-16 21:10:58 -04:00
parent 623b506691
commit 3dcb08cca3
2 changed files with 7 additions and 7 deletions

View File

@@ -36,4 +36,4 @@ msgstr "Starten von GIMP"
#: gimp.lua:243
msgid "Edit with GIMP"
msgstr "Bearbeiten mit Gimp"
msgstr "Bearbeiten mit GIMP"

View File

@@ -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