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

Avoid race conditions when creating cache directories #1355

Closed
wants to merge 1 commit into from

Conversation

ajhool
Copy link
Contributor

@ajhool ajhool commented Aug 24, 2018

No description provided.

@lovell
Copy link
Owner

lovell commented Aug 24, 2018

Thanks for this. Is it worth having this logic in a dedicated "ensureDir" function in lib/libvips.js that can be called where needed?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 98.776% when pulling 99f8845 on ajhool:master into 5bed3a7 on lovell:master.

@ajhool
Copy link
Contributor Author

ajhool commented Aug 25, 2018

Looks like there are five mkdir calls throughout the whole project.

install/dll-copy.js (2)
lib/libvips.js (2)
install/libvips.js (1)

install/libvips.js currently depends on lib/libvips.js

Maybe one function in lib/libvip.js that is also used in install/libvips.js, and a duplicate function in install/dll-copy.js?

@lovell
Copy link
Owner

lovell commented Aug 25, 2018

If you can get it to work, install/dll-copy.js should be able to import your new function from lib/libvips.js.

@lovell
Copy link
Owner

lovell commented Aug 29, 2018

Closed in favour of #1358

@lovell lovell closed this Aug 29, 2018
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.

3 participants