diff options
Diffstat (limited to 'publish')
-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 |