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

HTTP request, specifying an output path to a folder that doesn't exist will throw an error #126

Open
Watermelon914 opened this issue Jan 3, 2023 · 1 comment

Comments

@Watermelon914
Copy link
Member

image
If you specify an output filepath to a folder that doesn't exist for a http request, you'll be hit with this error.
I'm unsure if this is a bug or not, but it's somewhat problematic for trying to store temporary files in a subfolder within the tmp folder on the tgstation repo.

@ZeWaka
Copy link
Contributor

ZeWaka commented Sep 6, 2024

strange

rust-g/src/http.rs

Lines 137 to 140 in 31e0671

if let Some(output_filename) = prep.output_filename {
let mut writer = std::io::BufWriter::new(std::fs::File::create(output_filename)?);
std::io::copy(&mut response.into_reader(), &mut writer)?;
writer.flush()?;

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

No branches or pull requests

2 participants