func (x extractor) targetPath(zipFile *zip.File) (string, bool) {
	cleanPath := path.Clean(zipFile.Name)
	if cleanPath == x.sourceRoot {
		return x.targetRoot, true
	}
	if x.sourceRoot != "" {
		mustPrefix := x.sourceRoot + "/"
		if !strings.HasPrefix(cleanPath, mustPrefix) {
			return "", false
		}
		cleanPath = cleanPath[len(mustPrefix):]
	}
	return filepath.Join(x.targetRoot, filepath.FromSlash(cleanPath)), true
}
// targetPath returns the target path for a given zip file and whether
// it should be extracted.
targetPath returns the target path for a given zip file and whether
it should be extracted.
// targetPath returns the target path for a given zip file and whether // it should be extracted .
func (x extractor) targetPath(zipFile *zip.File) (string, bool) {
	cleanPath := path.Clean(zipFile.Name)
	if cleanPath == x.sourceRoot {
		return x.targetRoot, true
	}
	if x.sourceRoot != "" {
		mustPrefix := x.sourceRoot + "/"
		if !strings.HasPrefix(cleanPath, mustPrefix) {
			return "", false
		}
		cleanPath = cleanPath[len(mustPrefix):]
	}
	return filepath.Join(x.targetRoot, filepath.FromSlash(cleanPath)), true
}
func ( x extractor ) targetPath ( zipFile * zip . File ) ( string , bool ) { cleanPath := path . Clean ( zipFile . Name ) if cleanPath == x . sourceRoot { return x . targetRoot , true } if x . sourceRoot != " " { mustPrefix := x . sourceRoot + " " if ! strings . HasPrefix ( cleanPath , mustPrefix ) { return " " , false } cleanPath = cleanPath [ len ( mustPrefix ) : ] } return filepath . Join ( x . targetRoot , filepath . FromSlash ( cleanPath ) ) , true }
targetPath returns the target path for a given zip file and whether
it should be extracted.
targetPath returns the target path for a given zip file and whether it should be extracted .