Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 102528
Collapse All | Expand All

(-)mozilla-launcher-old (-11 / +16 lines)
Lines 299-325 Link Here
299
          shift 1 ;;
299
          shift 1 ;;
300
      esac
300
      esac
301
    else
301
    else
302
      if [[ $1 == *://*/* ]]; then
302
      url="$1"
303
        urls=("${urls[@]}" "$1")
303
      url=${url//(/%28}
304
      elif [[ $1 == *://* ]]; then
304
      url=${url//)/%29}
305
      url=${url//,/%2C}
306
307
      if [[ $url == *://*/* ]]; then
308
        urls=("${urls[@]}" "$url")
309
      elif [[ $url == *://* ]]; then
305
        # as of mozilla_1.7_rc1 the url checking changed for xremote
310
        # as of mozilla_1.7_rc1 the url checking changed for xremote
306
        # calls... now three slashes are required for urls, otherwise we
311
        # calls... now three slashes are required for urls, otherwise we
307
        # get the following error from xremote:
312
        # get the following error from xremote:
308
        #  Error: Failed to send command: 509 internal error
313
        #  Error: Failed to send command: 509 internal error
309
        urls=("${urls[@]}" "$1/")
314
        urls=("${urls[@]}" "$url/")
310
      elif [[ $1 != /* && -e $1 ]]; then
315
      elif [[ $url != /* && -e $url ]]; then
311
        # relative path to a file, transform to URL syntax
316
        # relative path to a file, transform to URL syntax
312
        urls=("${urls[@]}" "file://$PWD/$1")
317
        urls=("${urls[@]}" "file://$PWD/$url")
313
      elif [[ $1 == /* && -e $1 ]]; then
318
      elif [[ $url == /* && -e $url ]]; then
314
        # absolute path to a file, transform to URL syntax
319
        # absolute path to a file, transform to URL syntax
315
        urls=("${urls[@]}" "file://$1")
320
        urls=("${urls[@]}" "file://$url")
316
      elif [[ $1 != *:* && $1 == *@* ]]; then
321
      elif [[ $url != *:* && $url == *@* ]]; then
317
        # looks like an email address, prefix with mailto: so we can
322
        # looks like an email address, prefix with mailto: so we can
318
        # recognize it later.
323
        # recognize it later.
319
        urls=("${urls[@]}" "mailto:$1")
324
        urls=("${urls[@]}" "mailto:$url")
320
      else
325
      else
321
        # no idea what this is!  just add it to urls and hope it works
326
        # no idea what this is!  just add it to urls and hope it works
322
        urls=("${urls[@]}" "$1")
327
        urls=("${urls[@]}" "$url")
323
      fi
328
      fi
324
      shift
329
      shift
325
    fi
330
    fi

Return to bug 102528