remove() doesn't delete a subfolder inside my project folder. What is wrong here ?
See original GitHub issue- Operating System: Win 10 64 bit
- Node.js version: 8.7.0
fs-extra
version: 5.0.0
I am trying to delete a non-empty subfolder which is inside my project directory but i can’t seem to delete it with fs.remove(folderPath). The code runs with no errors but the folder is still there and i can’t even delete it manually unless i first empty the folder and delete all the files in there. I get a permission related error when i try to directly delete the folder even though i am the owner/admin. Could it be a permissions related issue ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:18
Top Results From Across the Web
Fix "You have to delete all the items in this folder before you ...
This PowerShell script deletes all files and sub-folders of the given folder in SharePoint Online using the Remove-PnPListItem cmdlet.
Read more >[Solved] Unable to Delete a Folder In Windows 10 - mulcas
Solution · Option 1: Restart Windows File Explorer · Option 2: Remove the folder using Windows Command-line · Option 3: Rename the folder...
Read more >Why I can't delete a folder? - Ask Ubuntu
Try cd into the directory, then remove all files using rm -rf * . Then try going out of the directory and use...
Read more >c# - Cannot delete directory with Directory.Delete(path, true)
I ran into this problem before. The root of the problem is that this function does not delete files that are within the...
Read more >You have to delete all the items in this folder before you can ...
Having me spend hours deleting files one by one is a lousy design. Give us the ability in One Drive for Business to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m seeing a similar problem on Windows. Every now and again in the test suite, it fails to remove a directory because it claims the directory is not empty. But when the process completes, the directory is gone. So could it be that there’s a race condition or that it’s a false warning?
@Inve1951 it can lead to issues like command injection.
https://hackernoon.com/nodejs-security-issue-javascript-node-example-tutorial-vulnerabilities-hack-line-url-command-injection-412011924d1b
childProcess.exec()
is a bash interpreter, not a program launcher.