Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for trimLeadingSlash (0.22 sec)

  1. cmd/untar.go

    		}
    
    		switch header.Typeflag {
    		case tar.TypeDir: // = directory
    			if o.ignoreDirs {
    				continue
    			}
    			name = trimLeadingSlash(pathJoin(name, slashSeparator))
    		case tar.TypeReg, tar.TypeChar, tar.TypeBlock, tar.TypeFifo, tar.TypeGNUSparse: // = regular
    			name = trimLeadingSlash(path.Clean(name))
    		default:
    			// ignore symlink'ed
    			continue
    		}
    		if o.prefixAll != "" {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 32K bytes
    - Viewed (0)
  3. cmd/bucket-handlers.go

    	objects := make([]ObjectV, len(deleteObjectsReq.Objects))
    	// Convert object name delete objects if it has `/` in the beginning.
    	for i := range deleteObjectsReq.Objects {
    		deleteObjectsReq.Objects[i].ObjectName = trimLeadingSlash(deleteObjectsReq.Objects[i].ObjectName)
    		objects[i] = deleteObjectsReq.Objects[i].ObjectV
    	}
    
    	// Make sure to update context to print ObjectNames for multi objects.
    	ctx = updateReqContext(ctx, objects...)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 61.6K bytes
    - Viewed (0)
  4. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 05 11:39:31 GMT 2024
    - 124.7K bytes
    - Viewed (0)
Back to top