EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElZipWriter item names with only first letter

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#24217
Posted: 03/21/2013 08:05:49
by David Eršil (Standard support level)
Joined: 01/15/2013
Posts: 34

Hi,
I am working with TElZipWriter and trying to create a new archive containing one file. The whole process seems to work fine, except the name of the file contained inside the archive always has just one letter from the name I set. My code (Windows Store App) is based on your examples, but I still can't manage to overcome this issue.

Code
string fileName = "input.jpg";

StorageFile theFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.OpenIfExists);
Stream F = (await theFile.OpenAsync(FileAccessMode.Read)).AsStream();

StorageFile zip = await ApplicationData.Current.LocalFolder.CreateFileAsync("archive.zip", CreationCollisionOption.OpenIfExists);
Stream Z = (await zip.OpenAsync(FileAccessMode.ReadWrite)).AsStream();

TElZipWriter zipWriter = new TElZipWriter();
zipWriter.CompressionAlgorithm = SBZipUtils.Unit.ZIP_COMPRESSION_DEFLATE;
zipWriter.CreateArchive();

F.Position = 0;
TElZipArchiveDirectoryEntry de = zipWriter.Add(F);
de.FileName = fileName;

Z.SetLength(0);
zipWriter.Compress(Z);
zipWriter.Close();

await Z.FlushAsync();
Z.Dispose();


This will result in "archive.zip" containing file "i".

I would much appreciate any help with this.
Thanks in advance.
#24218
Posted: 03/21/2013 08:18:57
by Ken Ivanov (EldoS Corp.)

David,

Thank you for reporting the problem. We will have a look into the code and get back to you as soon as possible.
#24270
Posted: 03/25/2013 06:54:46
by David Eršil (Standard support level)
Joined: 01/15/2013
Posts: 34

I would like to say that after updating my SSB binaries from 10.0.230 to 10.0.233 this problem no longer persists :)

Let me apologize for any inconvenience caused.
Thank you anyway.

Reply

Statistics

Topic viewed 477 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!