moveLibSymlinks moves a list of symlinks from source to destination directory.
(m mounter, symlinks []string, srcDir, destDir string)
| 75 | |
| 76 | // moveLibSymlinks moves a list of symlinks from source to destination directory. |
| 77 | func moveLibSymlinks(m mounter, symlinks []string, srcDir, destDir string) error { |
| 78 | for _, l := range symlinks { |
| 79 | oldpath := filepath.Join(srcDir, l) |
| 80 | newpath := filepath.Join(destDir, l) |
| 81 | if err := m.Rename(oldpath, newpath); err != nil { |
| 82 | return fmt.Errorf("move symlink %s => %s: %w", oldpath, newpath, err) |
| 83 | } |
| 84 | } |
| 85 | return nil |
| 86 | } |