Skip to content

Commit

Permalink
Merge pull request #152 from mxswd/bugfix/relative-image-paths
Browse files Browse the repository at this point in the history
Made images in html exports use relative paths
  • Loading branch information
ReagentX committed Sep 3, 2023
2 parents 5d771d4 + e102aa9 commit 129273f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion imessage-exporter/src/app/attachment_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ impl AttachmentManager {
eprintln!("Unable to update {to:?} metadata: {why}")
}
}
attachment.copied_path = Some(to);

if let Ok(relative_path) = to.strip_prefix(&config.options.export_path) {
attachment.copied_path = Some(relative_path.to_path_buf());
} else {
attachment.copied_path = Some(to);
}
}
Some(())
}
Expand Down

0 comments on commit 129273f

Please sign in to comment.