Use safer method to remove empty directory
This commit is contained in:
@@ -1280,7 +1280,7 @@ impl RepoHandle {
|
|||||||
.next()
|
.next()
|
||||||
.is_none()
|
.is_none()
|
||||||
{
|
{
|
||||||
if let Err(e) = std::fs::remove_dir_all(¤t_dir) {
|
if let Err(e) = std::fs::remove_dir(¤t_dir) {
|
||||||
return Err(WorktreeRemoveFailureReason::Error(format!(
|
return Err(WorktreeRemoveFailureReason::Error(format!(
|
||||||
"Error deleting {}: {}",
|
"Error deleting {}: {}",
|
||||||
&worktree_dir.display(),
|
&worktree_dir.display(),
|
||||||
|
|||||||
Reference in New Issue
Block a user