• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird missing file...
#6
The libraries look to be safe. They do not appear to delete files for any reason in the library folder of CanelaDB. They do prune files as needed in CanelaDB/database/ folder and CanelaDB/config/ folders.

On the other hand, LCM does aggressively clean out files inside of its CanelaDB/libraries/ folder. I will paste the code below.

Code:
command initializeCanelaDB
   local tLibraryPath

   wait 0 milliseconds with messages ## GIVE THE ENGINE A CHANCE TO SPIN UP
   put "LCM-AUTH-CODE-HERE" into gCDBAuthKey
   set the itemDel to "/"

   if the environment is "development" then
        put item 1 to -2 of (the effective fileName of this stack) into tLibraryPath
   else
        switch the platform
             case "android"
             case "iPhone"
                  put specialFolderPath("engine") into tLibraryPath
                  break

             case "MacOS"
                  put specialFolderPath("support") into tLibraryPath
                  put "/" & "CanelaSoftware/" & gCSManifestA["productName"] & "/" & gCSManifestA["productVersion"] & "/data" after tLibraryPath --LCM SPECIFIC PATH
                  break

             case "Win32"
             case "Linux"
                  put item 1 to -2 of (the effective fileName of this stack) into tLibraryPath
                  break
        end switch
   end if

   put "/config/CanelaDB/libraries/" after tLibraryPath

   if the environment <> "development" then
        repeat for each line xLine in files(tLibraryPath)
             if xLine <> "CDB_Header.lib" and xLine <> "CDB_Starter.lib" then
                  delete file (tLibraryPath & xLine)
             end if
        end repeat
   else
        if there is a file (tLibraryPath & ".DS_Store") then
             delete file (tLibraryPath & ".DS_Store")
        end if
   end if

   --START CanelaDB
   csi_verifyLibraries tLibraryPath

   try
        start using stack (tLibraryPath & "CDB_Header.lib")
        start using stack (tLibraryPath & "CDB_Starter.lib")

   catch tError
        answer "There was an error initializing CanelaDB:" && tError
        exit to top
   end try

   --SET OPTIONAL LOGGING MODE
   cdb_SetLogMode "message box"

   cdb_loadTable "cdbCache"
end initializeCanelaDB
  Reply


Messages In This Thread
Weird missing file... - by stamatis - 12-07-2021, 08:03 AM
RE: Weird missing file... - by clarencemartin - 12-07-2021, 12:03 PM
RE: Weird missing file... - by clarencemartin - 12-07-2021, 05:33 PM
RE: Weird missing file... - by stamatis - 12-07-2021, 11:20 PM
RE: Weird missing file... - by mark_talluto - 12-08-2021, 01:21 AM
RE: Weird missing file... - by mark_talluto - 12-08-2021, 01:50 AM
RE: Weird missing file... - by stamatis - 12-09-2021, 09:35 AM
RE: Weird missing file... - by mark_talluto - 12-10-2021, 11:41 PM
RE: Weird missing file... - by clarencemartin - 12-11-2021, 12:33 AM
RE: Weird missing file... - by mark_talluto - 12-13-2021, 08:00 PM
RE: Weird missing file... - by clarencemartin - 12-13-2021, 08:13 PM
RE: Weird missing file... - by mark_talluto - 12-13-2021, 08:38 PM
RE: Weird missing file... - by clarencemartin - 12-13-2021, 08:47 PM
RE: Weird missing file... - by stamatis - 12-14-2021, 02:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)