'Save Page As' on standalone images suggests wrong filename

Bug #1025894 reported by gue5t gue5t
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Undecided
Unassigned

Bug Description

To reproduce:
Visit a page that's just an image, e.g. <http://i.imgur.com/pDJcx.png>.
Press ^S or File->Save Page As.
Midori suggests "‪pDJcx.png (406x378 pixels)" as a filename, instead of just "pDJcx.png".

This is with a recent (~1 day) git version.

EDIT: Actually, this is substantially broken. If you change the filename and proceed, I ended up with both a file and a folder; the file is named <filename>.html where <filename> is the filename specified by the user, and the folder is named <filename> and is empty.

Ideally we would allow the user to choose whether to save just html or an archive for full pages; often the text is the only important part of a page and all the js and images are useless.

gue5t gue5t (gue5t)
description: updated
Revision history for this message
Cris Dywan (kalikiana) wrote :

I went ahead and added a code path that only saves the file, also not using the title for the filename. I also added a checkbox that is visible whenever it's text and there may be other resources.

Changed in midori:
status: New → Fix Committed
Revision history for this message
gue5t gue5t (gue5t) wrote :

This code path doesn't seem to work right, thought I could have sworn it did before. At any rate, debugging all appears well until this line (midori-browser.c:1149) is reached:

file_only = !file_only && !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox));

Before this point, file_only was TRUE as initialized. At this point, if the page was just an image, checkbox is uninitialized because the checkbox is only created if midori_view_can_view_source returned TRUE. So file_only gets set to false and it saves the actual image as image.jpg.html (if user entered image.jpg) and creates a image.jpg/ folder for its resources.

Cris Dywan (kalikiana)
Changed in midori:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.