Simplify if statement
This commit is contained in:
parent
ae9531e712
commit
2dc5215390
|
@ -53,12 +53,10 @@ function _filesystem.list_directory_files(path, exts, recursive)
|
||||||
end
|
end
|
||||||
|
|
||||||
function _filesystem.save_image_async_curl(redownload, create_dirs, url, filepath, callback)
|
function _filesystem.save_image_async_curl(redownload, create_dirs, url, filepath, callback)
|
||||||
if not redownload then
|
if not redownload and Gio.File.query_exists(Gio.File.new_for_path(filepath)) then
|
||||||
if Gio.File.query_exists(Gio.File.new_for_path(filepath)) then
|
|
||||||
callback()
|
callback()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
awful.spawn.with_line_callback(string.format("curl -L -s %s -o %s %s", url, filepath, (create_dirs and "--create-dirs" or "")),
|
awful.spawn.with_line_callback(string.format("curl -L -s %s -o %s %s", url, filepath, (create_dirs and "--create-dirs" or "")),
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue