treat file:// as an fs target

This commit is contained in:
Jack L. Frost 2014-09-25 19:27:52 +04:00
parent 69cbb6f286
commit a4286e8b6c
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ handle_uri() {
}
handle_fs_target() {
local target="$1"
local target="${1##*file://}"
[[ -e "$target" ]] || return 1
@ -41,7 +41,7 @@ main() {
target="$1"
[[ "$target" ]] || { usage; exit; }
if [[ -e "$target" ]]; then
if [[ -e "$target" || "$target" == 'file://'* ]]; then
handle_fs_target "$target"
else
handle_uri "$target"