MCPcopy Create free account
hub / github.com/driangle/taskmd / resolveRelPath

Function resolveRelPath

apps/cli/internal/cli/rm.go:123–133  ·  view source on GitHub ↗

resolveRelPath returns the task file path relative to the scan directory.

(scanDir, filePath string)

Source from the content-addressed store, hash-verified

121
122// resolveRelPath returns the task file path relative to the scan directory.
123func resolveRelPath(scanDir, filePath string) string {
124 absScanDir, err := filepath.Abs(scanDir)
125 if err != nil {
126 return filePath
127 }
128 relPath, err := filepath.Rel(absScanDir, filePath)
129 if err != nil {
130 return filePath
131 }
132 return relPath
133}
134
135// cleanupWorklog removes the worklog file and its parent directory if empty.
136func cleanupWorklog(taskFilePath, taskID string) {

Callers 1

runRmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected