File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,9 +311,10 @@ func cleanupWCOWLayer(layerPath string) error {
311311 HomeDir : filepath .Dir (layerPath ),
312312 }
313313
314- // ERROR_DEV_NOT_EXIST is returned if the layer is not currently prepared.
314+ // ERROR_DEV_NOT_EXIST is returned if the layer is not currently prepared or activated.
315+ // ERROR_FLT_INSTANCE_NOT_FOUND is returned if the layer is currently activated but not prepared.
315316 if err := hcsshim .UnprepareLayer (info , filepath .Base (layerPath )); err != nil {
316- if hcserror , ok := err .(* hcsshim.HcsError ); ! ok || hcserror .Err != windows .ERROR_DEV_NOT_EXIST {
317+ if hcserror , ok := err .(* hcsshim.HcsError ); ! ok || ( hcserror .Err != windows .ERROR_DEV_NOT_EXIST && hcserror . Err != syscall . Errno ( windows . ERROR_FLT_INSTANCE_NOT_FOUND )) {
317318 return errors .Wrapf (err , "failed to unprepare %s" , layerPath )
318319 }
319320 }
You can’t perform that action at this time.
0 commit comments