Discussion:
[patch] consistent file save UI behaviour for overwriting files
Jeremy Henty
2013-01-06 14:47:31 UTC
Permalink
The UI for downloading files is split between Dillo (which prompts for
a file to save to) and the downloads DPI (which prompts for another
file if the first file already exists). This leads to inconsistent
behaviour for "Save link as file" depending on whether the URL is
cached or not - if it is cached then any existing file is silently
overwritten but if it is not cached we go to the downloads DPI which
prompts before overwriting anything.

These two patches move the UI logic from the downloads DPI into Dillo.
This puts all the UI logic in the same place and ensures consistent
behaviour for "Save link as file" whether or not the URL is cached.

http://starurchin.org/dillo/patch/downloads-dpi_file_test_remove.html
http://starurchin.org/dillo/patch/uicmd-cc_file_test_add.html

Comments? Shall I push this?

Regards,

Jeremy Henty
corvid
2013-01-06 18:52:08 UTC
Permalink
Post by Jeremy Henty
These two patches move the UI logic from the downloads DPI into Dillo.
This puts all the UI logic in the same place and ensures consistent
behaviour for "Save link as file" whether or not the URL is cached.
Seems good to have the logic in dillo.

I imagine a later step would be to teach UIcmd_save_file_check() about
file permissions, errno possibilities, etc.
Jeremy Henty
2013-01-08 20:40:44 UTC
Permalink
Post by corvid
These two patches move the UI logic from the downloads DPI into
Dillo. This puts all the UI logic in the same place and ensures
consistent behaviour for "Save link as file" whether or not the
URL is cached.
Seems good to have the logic in dillo.
OK, it's in.
Post by corvid
I imagine a later step would be to teach UIcmd_save_file_check()
about file permissions, errno possibilities, etc.
I guess so, although in the case of the file not existing you would
want to check whether the missing component was the last one in the
path or not.

Regards,

Jeremy Henty

Loading...