gears.filesystem: Convert tabs to spaces

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-04-02 18:46:54 +02:00
parent b3635a0101
commit dc717af3ad
1 changed files with 10 additions and 10 deletions

View File

@ -15,16 +15,16 @@ local filesystem = {}
-- @tparam string dir The directory.
-- @return (true, nil) on success, (false, err) on failure
function filesystem.mkdir(dir)
local gfile = Gio.File.new_for_path(dir)
local success, err = gfile:make_directory_with_parents()
if success then
return true
end
if err.domain == Gio.IOErrorEnum and err.code == "EXISTS" then
-- Direcotry already exists, let this count as success
return true
end
return false, err
local gfile = Gio.File.new_for_path(dir)
local success, err = gfile:make_directory_with_parents()
if success then
return true
end
if err.domain == Gio.IOErrorEnum and err.code == "EXISTS" then
-- Direcotry already exists, let this count as success
return true
end
return false, err
end
--- Check if a file exists, is readable and not a directory.