All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

VWR-25862 Fix viewer caches not being cleared.

Review Request #315 - Created May 27, 2011 and submitted

Log Linden Reviewers
viewer
vwr-25681, vwr-25862
None viewer-development
This is a patch to fix the issues with clearing viewer caches documented in VWR-25862. I removed the leading delimiter in the place where each of the three caches are cleared.  I also removed the mac specific deleteFilesInDir() method, which should have been removed for STORM-477. I removed unneeded calls to getDirDelimiter() in llvocache.cpp.
Test plan: https://jira.secondlife.com/browse/VWR-25862?#comment-262800

I built and tested on Mac, Windows and Linux and saw the correct behavior when clicking the clear history button and the move cache button.
Posted (May 27, 2011, 1:51 p.m.)
agree, work on linux (cannot try other OS)

imho linux side is a "ship it" (i don't flag it bc wait somebody reviw on other OS)
Ship it!
Posted (May 27, 2011, 2:41 p.m.)
looks good to me.
Posted (June 6, 2011, 8:37 a.m.)

   

  
indra/newview/llvocache.cpp (Diff revision 2)
 
 
 
 
 
This patch removes (everywhere, not just here) the delimiter in front of 'mask' passed to deleteFilesInDir.

deleteFilesInDir does nothing with mask but pass it to LLDirIterator. Apparently, the introduction of LLDirIterator (new in Viewer 2) requires mask to NOT start with a delimiter.

However, you fail to correct this consistently; for example, in LLAppViewer::migrateCacheDirectory we have the following code:

  std::string mask = delimiter + "*.*";

  LLDirIterator iter(old_cache_dir, mask);

Can you explain that works (does it?) and the code that you changed didn't work?
  1. You're right, I checked the calls to deleteFilesInDir and fixed the ones that I felt able to reproduce and show that they were fixed.  I reported the other calls to deleteFilesInDir that need to be fixed as subtasks of VWR-25861.  I didn't check the other uses of LLDirIterator because I thought they would have been fixed when STORM-477 was merged. I'll fix what I can and report the others.
    
    Thanks