1. Timo Enssle
  2. PowerBuilder
  3. Friday, 10 March 2023 07:32 AM UTC

Hello,

I have an issue with the Compress-Function. When i want to compress a folder and in the folder path is a dot the function returns -13

(e.g. E:\temp\f.older_name\compress_test). The dot is not in the foldername that has to be compressed, it can be located anywhere in the path. Without the dot everything works fine. Is this a known problem or is there a solution for my Problem?

I am working with Powerbuilder 2021 Build 1506

 

Thank you for your help

Timo

 

integer li_rc
string ls_Foldername
string ls_Source

CompressorObject lnv_Compress

ls_Foldername = "C:\temp\f.older_name\compress_test"
ls_Source = "C:\temp\f.older_name\compress_test\"

lnv_Compress = create CompressorObject

li_rc = lnv_Compress.Compress(ls_Source, ls_Foldername, ArchiveFormatZip!) // returns -13
René Ullrich Accepted Answer Pending Moderation
  1. Friday, 10 March 2023 09:03 AM UTC
  2. PowerBuilder
  3. # 1

Sounds like a bug. You should open a bug report.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 10 March 2023 10:27 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

What's in ls_folderName used for?

What's in ls_ExportPath? It should be a path with a filename I think.

regards

Comment
  1. Miguel Leeuwe
  2. Friday, 10 March 2023 10:40 AM UTC
I think that your ls_filderName should not only be a path, but also include a filename.zip maybe?
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 10 March 2023 10:42 AM UTC
Also, try setting the destination to a different folder as the origin. If not successful, create a Bug ticket as suggested by Mr. Ullrich.

:)
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 10 March 2023 10:44 AM UTC
Since you say it works when not dot is in the path, maybe, when you don't include the filename in the destination, powerbuilder assumes that the filename extension is whatever follows the lastpos() of the dot in your path. (would still be a bug maybe).
  1. Helpful
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Monday, 13 March 2023 03:05 AM UTC
  2. PowerBuilder
  3. # 3

Hi Timo,

This is because there is a dot in the target directory, the Compress function will not append the file extension. Please report the issue via our standard support ticketing system to ensure it is being properly received and tracked by our tech support:
https://www.appeon.com/standardsupport/. Many thanks in advance.

In your case, it will create file 'compress_test' instead of 'compress_test.zip'. However, 'compress_test' conflicts with the existing folder name 'compress_test', so it failed to be compressed. Please try to work around the issue by specifying the file extension, for example:
ls_Foldername = "C:\temp\f.older_name\compress_test.zip"

Regards,
Kai

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.