Skip to content

Commit

Permalink
fix: canonicalize was giving error
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Nov 19, 2024
1 parent 98a052a commit cd9dcd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/routing/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub async fn edit(
let old_filepath = state.env_vars.paths.get_path_from_slug(&old_filelink);
let new_filepath = state.env_vars.paths.get_path_from_slug(&new_qp.filelink);

if old_filepath.canonicalize()? != new_filepath.canonicalize()? {
if old_filepath != new_filepath {
if let Err(e) = fs::copy(old_filepath, new_filepath).await {
tracing::error!("Error copying file: {}", e);

Expand Down

0 comments on commit cd9dcd0

Please sign in to comment.