Skip to content

PSI-specific symlink evaluation #127

@sbliven

Description

@sbliven

checkMetadata.go:395 contains the following:

	// NOTE: this part seems very PSI specific
	// [if lvl.1 (or 2?) path == "sls" and lvl.3 (or 4?) path == "data"] => evaluate symlinks in path
	parts := strings.Split(sourceFolder, "/")
	if len(parts) > 3 && parts[3] == "data" && parts[1] == "sls" {
		var err error
		sourceFolder, err = filepath.EvalSymlinks(sourceFolder)
		if err != nil {
			return "", fmt.Errorf("failed to find canonical form of sourceFolder:%v %v", sourceFolder, err)
		}
		//log.Printf("Transform sourceFolder %v to canonical form: %v", val, sourceFolder)
		metaDataMap["sourceFolder"] = sourceFolder
	}

Can this code be deleted? If not, can it be replaced with a more generic option to resolve symlinks in sourceFolder?

This issue should be discussed with our beamline scientists.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions