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 "File exists mkdir" error message. #68

Merged
merged 1 commit into from
Jan 24, 2019
Merged

Conversation

sainthkh
Copy link
Contributor

The problem was that on Windows, paths that end with "/" like "D:\project\dir.graphql_ppx_cache/" don't work with Sys.file_exists or Sys.is_directory.

In other words, even if there were .graphql_ppx_cache folder in the project, Sys.file_exists return false and Sys.is_directory returns Sys_error.

In this PR, I've solved this problem(#67) by creating a function that removes the last "/" character.

I've changed the code from file_exists to is_directory because the code seems more intuitive (to me). You can always change it back.

@mhallin
Copy link
Owner

mhallin commented Jan 24, 2019

Great, thanks!

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