It is currently Tue Dec 01, 2020 4:19 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Createpack & Files in Temp
PostPosted: Sun Oct 04, 2020 6:01 pm 
Offline
User
User

Joined: Thu Mar 13, 2014 4:31 pm
Posts: 28
Hallo,

I've written a routine with which I pack files. However, these "libarchive_" files are not deleted after packing and remain in the Temp directory until the program ends.
I cannot delete the files either because they are still used by the program even though the file is already packed. If I now pack files that combine 12GB and pack each file individually, the files remain until the end of the program and my temp becomes fuller and fuller.

Image

Left are the libarchive_ Packed files in Temp.

Image

Can not Delete or Copy/Move. But are already packed (Right Window).


How can I unlock the files that have been packed with Creatpack?


--- Snippet

Code:

Macro ReadFile2Mem(diFileName, PackedFile)
      Define MemoryImage = OpenFile( #PB_Any, diFileName,#PB_File_SharedRead|#PB_File_SharedWrite)
       
        If ( MemoryImage )                 
            uFileLen.l  = Lof ( MemoryImage )
           
            *FileMemory =  AllocateMemory( uFileLen )
           
            If ( *FileMemory )                 
               
                ReadedSize.q = ReadData( MemoryImage, *FileMemory, uFileLen)
               
                CloseFile(MemoryImage)
                                             
                 AddPackMemory(DC::#PACKING, *FileMemory , ReadedSize, PackedFile )
                                               
                 ClosePack( DC::#PACKING )                                                                                                               
               
                FreeMemory( *FileMemory )
            EndIf
           
        EndIf
EndMacro 

  If CreatePack(DC::#PACKING, szPackFile , CFG::*Exile\Archive\uPlugin ,CFG::*Exile\Archive\uLevel)                     
                           
                            ReadFile2Mem(ModsPak()\szDir + ModsPak()\szPak, Str( uSrcWsID ) + "\" + ModsPak()\szPak )
                           
                            System_Set_Priority( GetFilePart( ProgramFilename() ) , #NORMAL_PRIORITY_CLASS)
                            If ( uItem = MaxCnt )
                                Break
                            EndIf
                           
                            Delay( 5 )
                            ClosePack( DC::#PACKING )                           
                            Delay( 5 )                           
                            Continue
                        EndIf
                    Else
                        SetGadgetText( DC::#Text_006, GetFilePart( szPackFile,1 ))
                        SetGadgetText( DC::#Text_007, "- Exists ... no action")
                    EndIf


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye