• Re: Zlib: path name cannot be split into prefix and name

    From Alexandru@21:1/5 to All on Sat Sep 24 23:54:19 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to All on Sat Sep 24 23:21:21 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Alexandru on Sun Sep 25 12:40:35 2022
    Alexandru <[email protected]> wrote:
    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?

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Rich on Sun Sep 25 06:08:15 2022
    Rich schrieb am Sonntag, 25. September 2022 um 14:40:40 UTC+2:
    Alexandru <[email protected]> wrote:
    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?
    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.
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Alexandru on Sun Sep 25 21:42:47 2022
    Alexandru <[email protected]> wrote:
    Rich schrieb am Sonntag, 25. September 2022 um 14:40:40 UTC+2:
    Alexandru <[email protected]> wrote:
    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?

    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.

    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?

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)