diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-01-27 18:16:48 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-01-27 18:16:48 +0000 |
commit | 7d250c4b3d10ff78a68d5361d962b42d7d53284b (patch) | |
tree | ebbdcc511d2f48d78bb2af976e916be6ea3dc7ff | |
parent | e54fa22fe506ba1337773da83e15121f10491233 (diff) |
Fix output when we publish a single directory.
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@578 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-x | publish | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -222,9 +222,11 @@ base_uri="$base_http/$d_server_http_base/" main_uri="$base_uri" trail="" +one_dir_only="" if [ "$#" = 1 ]; then if [ -d "$1" ]; then trail="/" + one_dir_only=1 else main_uri="$base_uri$( echo -n "$(basename "$1")" | uri_encode )" fi @@ -275,7 +277,11 @@ while [ "$#" -gt 0 ]; do shift if [ -z "$relative" ]; then - uri="$base_uri""$( echo -n "`basename "$file"`" | uri_encode )" + if [ -z "$one_dir_only" ]; then + uri="$base_uri""$( echo -n "`basename "$file"`" | uri_encode )" + else + uri="$base_uri" + fi else uri="$base_uri""$( echo -n $file | uri_encode )" fi |