瀏覽代碼

Merge pull request #27072 from Microsoft/jjh/fix26843

Windows: Don't resolve volume dest
Brian Goff 8 年之前
父節點
當前提交
d89fb40e1c
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      container/container_windows.go

+ 4 - 6
container/container_windows.go

@@ -55,12 +55,10 @@ func (container *Container) UnmountVolumes(forceSyscall bool, volumeEventLog fun
 	)
 	)
 
 
 	for _, mntPoint := range container.MountPoints {
 	for _, mntPoint := range container.MountPoints {
-		dest, err := container.GetResourcePath(mntPoint.Destination)
-		if err != nil {
-			return err
-		}
-		volumeMounts = append(volumeMounts, volume.MountPoint{Destination: dest, Volume: mntPoint.Volume, ID: mntPoint.ID})
-
+		// Do not attempt to get the mountpoint destination on the host as it
+		// is not accessible on Windows in the case that a container is running.
+		// (It's a special reparse point which doesn't have any contextual meaning).
+		volumeMounts = append(volumeMounts, volume.MountPoint{Volume: mntPoint.Volume, ID: mntPoint.ID})
 	}
 	}
 
 
 	// atm, this is a no-op.
 	// atm, this is a no-op.