Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Zlib: path name cannot be split into prefix and name

26 views
Skip to first unread message

Alexandru

unread,
Sep 25, 2022, 2:21:24 AM9/25/22
to
I get this error from zlib while I'm compressing some files into a an archive:

path name cannot be split into prefix and name
while executing
"formatHeader $name [statFile $in $followlinks]"
(procedure "writefile" line 2)
invoked from within
"writefile $x $fh $dereference $x"
(procedure "tar::create" line 13)
invoked from within
"tar::create $fd $paths -chan"

Any idea what could cause this? I don't think the error has anything to do with the Tcl command "file split".

The file names and paths look normal to me and the function worked fine until now.

Many thanks
Alexandru

Alexandru

unread,
Sep 25, 2022, 2:54:21 AM9/25/22
to
I think the issue are files with long file names. I have a few with a full path of 271 chars and the file name is 152 chars long.
Is there a limitation regarding the length of the file path length in zlib?

Rich

unread,
Sep 25, 2022, 8:40:40 AM9/25/22
to
No, zlib does not know anything about filenames. zlib only compresses
a blob of data.

Your error is from the tar module, and given the length you state
above, you might just be exceeding the max length for a filename in the
header for the tar variant that the tcllib tar module generates. Which
makes the error message a bit confusing.

Alexandru

unread,
Sep 25, 2022, 9:08:18 AM9/25/22
to
Thanks, Rich, indeed, it's the tar module.
How this be avoided in an application, that runs in Windows and where the file paths can be longer?

Rich

unread,
Sep 25, 2022, 5:42:51 PM9/25/22
to
Update the tar module to generate tar files in one of the extension
versions that allow for unlimited length filenames, and contribute the
updates back to Tcllib.

Although that is not likely the answer you were looking for.

0 new messages