On Sa, Jun 15, 2013, Dennis New wrote:
On Tue, 11 Jun 2013 23:26:21 -0400, Jorge Arellano Cid wrote:
On Tue, Jun 11, 2013 at 09:23:29PM +0200, Johannes Hofmann wrote:
On Mon, Jun 10, 2013 at 07:15:45PM -0400, Jorge Arellano Cid wrote:
On Mon, Jun 10, 2013 at 10:41:23PM +0200, Johannes Hofmann wrote:
On Wed, May 29, 2013 at 04:50:21AM -0400, Dennis New wrote:
Sometimes, when trying to save a document with long filenames, the truncated default save-as filename will start with a dot. (Ie. a hidden file.) This behaviour should change. Perhaps truncate the end of the filename instead (and preserve the file extension)?
Do you have an example where this happens? I see that it can happen with URLs like http://dillo.org/bla/.blub Is this the case where you are seeing the issue or do you get it with other types of URLs as well?
I was to ask the same question days ago (yes I reviewed the code to make a quick patch and it cuts starting from the end). An example would be clarifying.
If we don't get any more feedback, I'd just replace dots with underscores as well. What do you think?
That was one of the first things I considered, but thought that when saving a ".config" file it was good to keep the name. I'd like to know the real problem the user had.
The problem is with very long filenames, such as:
http://dennisn.dyndns.org/guest/pubstuff/dillo.long.file.name-0.69_r1337.fil...
Dillo seems to truncate with just the last 64 chars. So, in this example, the save-as filename would be saved as a hidden file ".file.name-....txt".
Perhaps a better solution would be to truncate the *middle* of the filename, thus preserving the beginning and file extension?
The attached patch does this, and inserts an ellipsis to indicate that something was replaced. The above URL becomes dillo.long.file.name-0.69_r133...789012345678901234567890123.txt which is 64 characters long. I like this approach, because both the beginning and the end are the most characteristic parts of a filename. Sebastian