Replaced checkIfFileExists with supertobi's fix and capitalized GIMP in gimp.po where I missed it.
This commit is contained in:
@@ -36,4 +36,4 @@ msgstr "Starten von GIMP"
|
||||
|
||||
#: gimp.lua:243
|
||||
msgid "Edit with GIMP"
|
||||
msgstr "Bearbeiten mit Gimp"
|
||||
msgstr "Bearbeiten mit GIMP"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user