From d19c37eee4447151a9d09e0411ca0108d4ceff7c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Sep 2020 10:23:16 +0200 Subject: [PATCH] more explanatory / clear error messages for lntree --- filemanager/cli.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/filemanager/cli.php b/filemanager/cli.php index 977c3e519a..3819b78de4 100755 --- a/filemanager/cli.php +++ b/filemanager/cli.php @@ -826,15 +826,19 @@ function do_lntree($from,$to) if (!file_exists($from)) { - usage("Directory '$from' does NOT exist!"); + usage("Source directory '$from' does NOT exist!"); } - elseif ($to[0] != '/' || file_exists($to)) + elseif ($to[0] != '/') { - usage("Directory '$to' does not exist!"); + usage("Destination directory '$to' must be an absolute path on host filesystem and accessible inside the container!"); + } + elseif (file_exists($to)) + { + usage("Destination directory '$to' MUST NOT exist!"); } elseif (!is_writable(dirname($to))) { - usage("Directory '$to' is not writable!"); + usage("Destination directory '$to' can not be created! Check it's mounted into the container (most easy use a directory inside /var/lib/egroupware)."); } Vfs::find($from, array( 'url' => true,