HandleFilePath handles files that are made with symlinks
(finalDir string, name string)
| 116 | |
| 117 | // HandleFilePath handles files that are made with symlinks |
| 118 | func HandleFilePath(finalDir string, name string) { |
| 119 | // Check if dir to link already exists |
| 120 | fileFolder, _ := path.Split(name) |
| 121 | fullDir := path.Join(finalDir, fileFolder) |
| 122 | if !PathExists(fullDir) { |
| 123 | err := os.Mkdir(fullDir, 0o755) |
| 124 | if err != nil { |
| 125 | log.Error("Failed to create parent directory.") |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | // InstallLinks is a wrapper over MakeLinks that parses the mode and uses it to create the correct link, as specified by the ctprc. |
| 131 | func InstallLinks(baseDir string, entry structs.Entry, to string, finalDir string, mode string) []string { |
no test coverage detected