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

Fixed Issue #1764 #1774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

purple-claw
Copy link

The file.mkdir function is trying to create a directory that already exists, which causing the EXIST error.
This function is not checking whether if the directory exists before trying to create it.

So i Go through lot of time before finding a solution with a simple logic, I added a check before calling file.mkdir function

if (!file.exists(path.dirname(filepath))) { file.mkdir(path.dirname(filepath)); }

It first checks if the directory exists using the file.exists function. If the directory does not exist, then it creates the directory using the file.mkdir function.

Thanks for Raising this Issue
Looking Forward to Help out more :)

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.

1 participant