@@ -31,6 +31,12 @@ main = do
3131 files <- getRecursiveContents (const $ return False) srcDir
3232
3333 case args of
34+ -- When the argument begins with hyphens, it's more likely that the user
35+ -- intends to attempt some arguments like ("--help", "-h", "--version", etc.)
36+ -- rather than create directory with that name.
37+ -- If dstDir begins with hyphens, the guard will prevent it from creating
38+ -- directory with that name so we can fall to the second alternative
39+ -- which prints a usage info for user.
3440 [dstDir] | not ("-" `isPrefixOf` dstDir) -> do
3541 forM_ files $ \file -> do
3642 let dst = dstDir </> file