Results 1 to 7 of 7

Thread: paszlib on Linux 64-bit creates empty archive

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Yeah, it does seem like TZipper can't read the save file. I've sent an executable that tests the path/file name to the user with the issue.
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  2. #2
    The report back is that my code can definitely access the .dat file with FileExists(), so that's not it.
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  3. #3
    Man, this sure is weird. His system can compress a file that already exists, but if the code has to create the file first, it doesn't work.

    Code:
    PROGRAM compressiontest;
    
    USES sdl, zipper;
    
    VAR Zip : TZipper;
        FileName : String;
        SaveFile : Text;
        I : Byte;
    
    BEGIN
       FileName := '1';
       Assign(SaveFile, 'saves/' + FileName + '.dat');
       Rewrite(SaveFile);
       FOR I := 1 TO 200 DO Writeln(SaveFile, 'HELLO WORLD!');
       Flush(SaveFile);
       Close(SaveFile);
    
       sdl_delay(500);
    
       Zip := TZipper.Create;
       Zip.FileName := 'saves/' + FileName + '.zip';
       Zip.Entries.AddFileEntry('saves/' + FileName + '.dat', 'saves/' + FileName + '.dat');
       Zip.ZipAllFiles;
       Zip.Free;
    
       Assign(SaveFile, 'saves/' + FileName + '.dat');
       Erase(SaveFile);
    END.
    The above code creates saves/1.zip and the zip archive shows the correct size of 1.dat inside it. But unzipping that file shows that its size is 0.
    Last edited by Christian Knudsen; 05-10-2012 at 07:18 PM. Reason: 'compress a file' not 'compile'
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

  4. #4
    Haven't used TZipper, but can point some things:
    - Linux has a case sensitive file system, double check what you save and what you load.
    - Be aware that you may have a restricted permission mask over file attributes, you may be expecting -rw-rw-rw- and you are getting anything else.
    - Your saving path can be different than your loading path.

  5. #5
    So updating the compiler from 2.4.0 to 2.6.0 and also not compiling with any debug information seems to have fixed the issue. Weird.
    Laserbrain Studios - Currently developing Hidden Asset!
    Ascii Sector
    - Real-time roguelike in space!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •