Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for trimLeadingSlash (0.93 sec)

  1. cmd/utils.go

    // empty inputs, instead returns "empty" as is.
    func pathClean(p string) string {
    	cp := path.Clean(p)
    	if cp == "." {
    		return ""
    	}
    	return cp
    }
    
    func trimLeadingSlash(ep string) string {
    	if len(ep) > 0 && ep[0] == '/' {
    		// Path ends with '/' preserve it
    		if ep[len(ep)-1] == '/' && len(ep) > 1 {
    			ep = path.Clean(ep)
    			ep += slashSeparator
    		} else {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  2. cmd/object-handlers.go

    	opts.ignoreErrs = strings.EqualFold(r.Header.Get(xhttp.MinIOSnowballIgnoreErrors), "true")
    	opts.prefixAll = r.Header.Get(xhttp.MinIOSnowballPrefix)
    	if opts.prefixAll != "" {
    		opts.prefixAll = trimLeadingSlash(pathJoin(opts.prefixAll, slashSeparator))
    	}
    
    	if err = untar(ctx, hreader, putObjectTar, opts); err != nil {
    		apiErr := errorCodes.ToAPIErr(s3Err)
    		// If not set, convert or use BadRequest
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 20:15:54 GMT 2024
    - 125.2K bytes
    - Viewed (0)
Back to top