Discussion:
do not truncate long filenames beginning with dot
Dennis New
2013-05-29 08:50:21 UTC
Permalink
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)?
Jorge Arellano Cid
2013-05-29 18:31:36 UTC
Permalink
Post by Dennis New
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)?
Yes. This should not happen.
--
Cheers
Jorge.-
Johannes Hofmann
2013-06-10 20:41:23 UTC
Permalink
Post by Dennis New
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?

Cheers,
Johannes
Jorge Arellano Cid
2013-06-10 23:15:45 UTC
Permalink
Post by Johannes Hofmann
Post by Dennis New
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.
--
Cheers
Jorge.-
Johannes Hofmann
2013-06-11 19:23:29 UTC
Permalink
Post by Jorge Arellano Cid
Post by Johannes Hofmann
Post by Dennis New
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?

Cheers,
Johannes
Jorge Arellano Cid
2013-06-12 03:26:21 UTC
Permalink
Post by Johannes Hofmann
Post by Jorge Arellano Cid
Post by Johannes Hofmann
Post by Dennis New
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.
--
Cheers
Jorge.-
Dennis New
2013-06-15 11:25:10 UTC
Permalink
Post by Jorge Arellano Cid
Post by Johannes Hofmann
Post by Jorge Arellano Cid
Post by Johannes Hofmann
Post by Dennis New
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.file.123456789012345678901234567890123.txt

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?
Sebastian Geerken
2013-06-15 12:10:01 UTC
Permalink
Post by Dennis New
Post by Jorge Arellano Cid
Post by Johannes Hofmann
Post by Jorge Arellano Cid
Post by Johannes Hofmann
Post by Dennis New
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.
http://dennisn.dyndns.org/guest/pubstuff/dillo.long.file.name-0.69_r1337.file.123456789012345678901234567890123.txt
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

Loading...