|
#1
|
|||
|
|||
|
removal of legacy folders
My patcher removes legacy files just fine... but it leaves the empty directory structure installed. Anyway to have that removed automatically as well?
Thanks. |
|
#2
|
||||
|
||||
|
You could do that from the TrueUpdate server script using Folder.Delete actions.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#3
|
|||
|
|||
|
Yeah, I was hoping to avoid that.
The current scenario where the files just get deleted automatically is the best. I can use Folder.Delete like you suggested, but that requires me to have knowledge of what is being removed. Unless I just go through and recursively delete any empty folder... |
|
#4
|
|||
|
|||
|
BTW, when do legacy files get deleted? Does it happen before the "On Post Patch" actions?
Thanks. |
|
#5
|
||||
|
||||
|
Do you mean with Visual Patch 3.0? (Your original post didn't specify.
)
__________________
--[[ Indigo Rose Software Developer ]] |
|
#6
|
|||
|
|||
|
Ahhh yeah, I posted in the wrong forum.
VP3. |
|
#7
|
||||
|
||||
|
No worries...
PATCH_STAGE_REMOVING_LEGACY_FILES happens right after PATCH_STAGE_PATCHING_FILES in the patching sequence. So, right after all of the files are patched. (I would have just said so above, but I was checking the source code to make sure. )It goes like this:
__________________
--[[ Indigo Rose Software Developer ]] |
|
#8
|
|||
|
|||
|
In case anyone needs this:
--[[ ************************************************** ******************************** Function: RemoveEmptyFolders Purpose: Recursively remove empty folders starting from the given folder. Arguments: (string) rootFolder Returns: nothing ************************************************** ******************************** --]] function g_RemoveEmptyFolders( rootFolder ) folders = Folder.Find( rootFolder, "*", false, nil ); if ( folders ) then -- recursively remove empty folders for i, folderName in folders do g_RemoveEmptyFolders( folderName ); end end -- All of the empty sub-folders have been removed. Do one last check to see -- if this folder has files or folders in it, if not, then remove it. folders = Folder.Find( rootFolder, "*", false, nil ); files = File.Find( rootFolder, "*.*", false, false, nil, nil ); if ( (not folders) and (not files) ) then -- This folder is also empty. Remove it. Debug.Print( "Folder to be removed: " .. rootFolder .. "\r\n" ); Folder.Delete( rootFolder ); end end |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| legacy files seem to behave wrong for multi versions | rjfioravanti | Visual Patch 3.5 Discussion | 1 | 11-12-2007 02:04 PM |
| delete legacy files | zebra | Visual Patch 2.0 | 3 | 01-30-2007 09:52 AM |
| Folders and subfolders | kallumama | Setup Factory 7.0 Discussion | 2 | 01-12-2006 04:09 PM |
| Add folders to the list | bobbie | AutoPlay Media Studio 5.0 | 16 | 06-27-2005 03:45 PM |
| INFO: Finding Shell Folders in the Registry | Support | Setup Factory 6.0 Knowledge Base | 0 | 10-10-2002 04:52 PM |
All times are GMT -6. The time now is 03:42 PM.








)
Linear Mode

