eZ Community » Forums » Developer » [eztararchivehandler.php] Limit of 99...
expandshrink

[eztararchivehandler.php] Limit of 99 in $v_stored_filename

[eztararchivehandler.php] Limit of 99 in $v_stored_filename

Friday 27 July 2007 6:16:37 pm - 4 replies

Hi,

Why does this limit exist ?

For a script I have to compress several images from eZ and very often the length of the filename is too long.

I must hack the lib or I have another way ?

Thanks

Séb

Friday 27 July 2007 6:58:15 pm

Hi Sébastien,

there is this enhancement

http://issues.ez.no/IssueView.php?Id=9651&activeItem=1

from last year, but not resolved.

Greetings, ekke

Friday 27 July 2007 10:09:23 pm

Ok, great but anyone knows why 99 ?

I don't believe it's a random value ? Why it's not in a setting configuration file ?

Thanks for your help blunk.gif Emoticon

Saturday 28 July 2007 11:00:43 pm

Hi Sebastien,

I had the same problem when I worked on the newsletter setup package.
The reason that it is 99 Chars is simply because the tar format does not support more. I guess it was defined somewhere in the past. The fact that you can compress also deeper structures in most systems is the fact that GNU/Tar and the Unix Tar have implemented proprietary extensions to bypass this limitation (two different of course blunk.gif Emoticon ).
As far as I could research, the implementation in eZ Publish was build compatible to the tar spec. There also had been some patches a long time ago (AFAIKR from Björn Dieding) that have been aimed to allow more characters. But they don't seem to work.

Because the code for that is quite complex and a new eZ Publish version is currently made which which will enable all to use the eZ components (ezcArchive doesn't have this limitation) it was decided to focus the resources on the new version instead fixing this shortcoming.

Anyway, you see the newsletter is working. So here is how I did it.

Because I didn't wanted to add another archive format (find one matching the requirements, licensing issues, and so on...) I decided to flatten the directory structure by a simple trick.
I created a class (eZMatryoshka - funny name heh? blunk.gif Emoticon ) that utilize an ini file to move the files in the archive to a "higher" location and during installation I move it back where it belongs.
Means I have a file or directory in

ezextension/extension/eznewsletter/design/somewhere/deep/in/the/tree/are/some/templates/waiting/for/inclusion/

which I simply move to:

ezextension/extension/eznewsletter/inclusion/

It would be better to have a ezmatryoshka directory there though. blunk.gif Emoticon

It was quickly written and could be finetuned I think, but you could give it a try, it should be working for you as well. You can find it in the eznewsletter_site package.

Remember that you have to change the file listing in "package.ezpkg/ezextension/extension-YOUREXTENSIONNAME.xml" in accordance or package the extension after you have applied the "matryoschka transforming".

Hope that helps you further a bit.

[info] Matryoshka as class name i used in the meaning of the russian matryoshka dolls http://en.wikipedia.org/wiki/Matryoshka

Tuesday 27 January 2015 9:28:31 am

The reply has been removed because of violation of forum rules.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from