Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix recursive deletion of directory not possible #48

Merged
merged 1 commit into from
Dec 2, 2019
Merged

Fix recursive deletion of directory not possible #48

merged 1 commit into from
Dec 2, 2019

Conversation

codegain
Copy link
Contributor

@codegain codegain commented Nov 19, 2019

The current implementation of "rmdir" is not able to recursively remove a directory.

If the "recursive" flag is set, a file list of the given directory is created (via nlist) and the loop deletes all these files. I think the directory is missing in this call if no "chdir" is performed.

In my case, my working directory was "/" and I called "rmdir" with the Parameters "/test-folder" and "true". The folder contained files and directories, so this function didn't delete anything although the recursive flag was set to "true".

@Nicolab Nicolab merged commit 8970bdb into Nicolab:master Dec 2, 2019
@Nicolab
Copy link
Owner

Nicolab commented Dec 2, 2019

Thanks 👍

@codegain codegain deleted the codegain-patch-1 branch December 4, 2019 09:51
@codegain
Copy link
Contributor Author

codegain commented Jan 16, 2020

@Nicolab Do you got any plans for a new release which includes these changes?

@Nicolab
Copy link
Owner

Nicolab commented Jan 16, 2020

Oops, missed! It's done :)

Nicolab added a commit that referenced this pull request Mar 9, 2020
@Nicolab
Copy link
Owner

Nicolab commented Mar 9, 2020

I had to go back to my original behavior. In my opinion for your problem, you need to see the directory path you're passing.

Maybe "rmdir" with the parameters "test-folder" (without /, relative) and "true"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants