aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/driver/mount_util.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/driver/mount_util.go b/pkg/driver/mount_util.go
index 200817d..50c78d2 100644
--- a/pkg/driver/mount_util.go
+++ b/pkg/driver/mount_util.go
@@ -74,8 +74,9 @@ func cleanupStaleStagingPath(stagingPath string) error {
}
// Check if directory still exists and remove it
+ // Use RemoveAll to handle cases where directory is not empty after imperfect unmount
if _, err := os.Stat(stagingPath); err == nil {
- if err := os.Remove(stagingPath); err != nil {
+ if err := os.RemoveAll(stagingPath); err != nil {
glog.Warningf("failed to remove staging path %s: %v", stagingPath, err)
return err
}