Point out more clearly when starting into import mode

This commit is contained in:
Adrian Kumpf
2021-02-06 20:53:36 +01:00
parent 03f01d67d2
commit 294bb28034
+5 -2
View File
@@ -26,8 +26,11 @@ defmodule Util do
def validate_import_dir(nil), do: nil
def validate_import_dir(path) do
path = Path.absname(path)
case File.ls(path) do
{:ok, [_ | _]} ->
{:ok, [_ | _] = files} ->
IO.puts("[info] Found #{length(files)} file(s) at '#{path}'. Starting in import mode!")
path
{:ok, []} ->
@@ -37,7 +40,7 @@ defmodule Util do
nil
{:error, reason} ->
IO.puts("Cannot access directory '#{path}': #{inspect(reason)}")
IO.puts("[warn] Cannot access directory '#{path}': #{inspect(reason)}")
nil
end
end