Skip to content

Commit 7d1e85f

Browse files
committed
fix unstable lib usage
1 parent 05fd4d2 commit 7d1e85f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/webserver/database/csv_import.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ pub(super) async fn run_csv_import(
160160
})?
161161
.file;
162162
let file_path = named_temp_file.path();
163-
let file_name = file_path.file_name().unwrap_or_default();
164163
let file = tokio::fs::File::open(file_path).await.with_context(|| {
165164
format!(
166165
"The CSV file {} was uploaded correctly, but could not be opened",
167-
file_name.display()
166+
file_path.display()
168167
)
169168
})?;
170169
let buffered = tokio::io::BufReader::new(file);
@@ -180,7 +179,7 @@ pub(super) async fn run_csv_import(
180179
let table_name = &csv_import.table_name;
181180
format!(
182181
"{} was uploaded correctly, but its records could not be imported into the table {}",
183-
file_name.display(),
182+
file_path.display(),
184183
table_name
185184
)
186185
})

0 commit comments

Comments
 (0)