Remove code for avoiding duped synced folders in config

This commit is contained in:
sophia 2022-02-15 15:25:34 -06:00 committed by Paul Hinze
parent 34c4bac2ec
commit 6daa8d52a2
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -235,16 +235,8 @@ func (m *Machine) SyncedFolders() (folders []*core.MachineSyncedFolder, err erro
machineConfig := config.ConfigVm
syncedFolders := machineConfig.SyncedFolders
// TODO(spox): Synced folders are getting duped in config. The `seen` is just a temporary
// hack to prevent duplicate entries
seen := map[string]bool{}
folders = []*core.MachineSyncedFolder{}
for _, folder := range syncedFolders {
if _, ok := seen[folder.Destination]; ok {
continue
}
seen[folder.Destination] = true
// TODO: get default synced folder type
folder.Type = "virtualbox"
plg, err := m.project.basis.component(m.ctx, component.SyncedFolderType, folder.Type)