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 save_to_disk with relative path #1923

Merged
merged 2 commits into from
Feb 22, 2021

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Feb 22, 2021

As noticed in #1919 and #1920 the target directory was not created using makedirs so saving to it raises FileNotFoundError. For absolute paths it works but not for the good reason. This is because the target path was the same as the temporary path where in-memory data are written as an intermediary step.

I added the makedirs call using fs.makedirs in order to support remote filesystems.
I also fixed the issue with the target path being the temporary path.

I added a test case for relative paths as well for save_to_disk.

Thanks to @M-Salti for reporting and investigating

@lhoestq lhoestq mentioned this pull request Feb 22, 2021
@lhoestq lhoestq merged commit a784920 into master Feb 22, 2021
@lhoestq lhoestq deleted the fix-save-to-disk-with-relative-path branch February 22, 2021 11:22
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.

None yet

1 participant