summaryrefslogtreecommitdiffstats
path: root/save-html.c
diff options
context:
space:
mode:
Diffstat (limited to 'save-html.c')
-rw-r--r--save-html.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/save-html.c b/save-html.c
index c50968e81..64ce94f66 100644
--- a/save-html.c
+++ b/save-html.c
@@ -23,10 +23,10 @@ void save_photos(struct membuffer *b, const char *photos_dir, struct dive *dive)
do {
put_string(b, separator);
separator = ", ";
- char *fname = get_file_name(pic->filename);
+ char *fname = get_file_name(local_file_path(pic));
put_format(b, "{\"filename\":\"%s\"}", fname);
+ copy_image_and_overwrite(local_file_path(pic), photos_dir, fname);
free(fname);
- copy_image_and_overwrite(pic->filename, photos_dir);
pic = pic->next;
} while (pic);
put_string(b, "],");