login about faq

Hello Chilkat,

We use ChilKat.Net Tar to generate "ustar" Tar files in our application. Recently I came across a strange problem with long file names / paths. The longest file paths of this dataset is 186 characters, which based on ustar specification (100+155) should be OK.

The annoying thing is, however, that I get no exception or LastErrorText whatsoever. It just halts the application in the middle of the air. FYI : I use the tar component in a BackgroundWorker and report the progress using the OnNextTarFile event.

Could you please let me know :

  • If it is possible to handle long file paths with your library?
  • What is considered as file path limitation by Chilkat in case of "ustar"?
  • and also how can I do a better exception handling with it?

Thank you very much in advance for your assistance.

Best Regards,

Yashar Moradi

Disy Informationssysteme GmbH

asked Aug 23 '13 at 08:39

MAVERIC77's gravatar image

MAVERIC77
1112


Long paths should be OK. Make sure that the progress callbacks are not causing the problem. Do this by removing the callback events. Does the same problem occur?

My advice would be to reproduce the problem in a very simple example that does not use background worker threads or event callbacks. If the problem can be reproduced in this way, then please provide a code snippet and sample data that can be used to reproduce the problem.

link

answered Aug 23 '13 at 11:48

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Hi,

Thank you for the prompt respond. I tried to run the same process without the complications of background thread, but still the problem occurs. The WriteTar process hangs the whole application and never returns control to the main code. Although when I try the same Folder, only with a shorter name with the same code, the WriteTar takes less than a second to run.

Here is my simplified code for this task. I would appreciate any assistance in this regard, because it has became a blocker for our application.

        Chilkat.Tar tar = new Chilkat.Tar();
        tar = new Chilkat.Tar();
        tar.WriteFormat = "ustar";
        bool success;
        success = tar.UnlockComponent(ChilkatUtilities.CHILKAT_TAR_LICENSE);
        if (success != true)
        {
            log.Error(tar.LastErrorText);
        }

        string directory = "someDirectoryPath\\~cmTmp130217323277860862";

        if (!Directory.Exists(directory))
            throw (
                new Exception(
                    string.Format(
                    Properties.Resources.ERR_FOLDER_NOT_EXIST,
                    directory)));

        string TargetFilename = "C:\\temp\\testChilkatTar.cmmap";
        if (File.Exists(TargetFilename))
            File.Delete(TargetFilename);

        success = tar.AddDirRoot(directory);
        if (success != true)
        {
            log.Error(tar.LastErrorText);
        }

        success = tar.WriteTar(TargetFilename);

The longest path passed to the function is something like this:

C:\Users\moradiafkan\Documents\GIS 2go Maps\~cmTmp130217323277860862\layers\ortho-fotos_des_landes_vorarlberg\.tiles\1.0.0\ortho-fotos_des_landes_vorarlberg\default\generated\s1\2\1.jpg

I thank you in advance,

Best regards,

Yashar Moradi

Disy Informationssysteme GmbH

link

answered Aug 26 '13 at 03:33

MAVERIC77's gravatar image

MAVERIC77
1112

edited Aug 26 '13 at 04:35

Yashar,

Make sure you're using the very latest version of Chilkat (v9.4.1). Turn on verbose logging by setting the tar.VerboseLogging property = true. Then set the tar.DebugLogFilePath property equal to the path of a log file that will be created. Run your program to get the hang. Then send the log file to support@chilkatsoft.com.

link

answered Aug 26 '13 at 08:51

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

You can try "Long Path Tool" program.

link

answered Oct 21 '13 at 12:32

Adam%20Fisher's gravatar image

Adam Fisher
1

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×12
×2

Asked: Aug 23 '13 at 08:39

Seen: 1,828 times

Last updated: Oct 21 '13 at 12:32

powered by OSQA