Closed Bug 57881 Opened 25 years ago Closed 24 years ago

Can't load cached pages if cache dir gets moved

Categories

(Core :: Networking: Cache, defect, P3)

PowerPC
Mac System 9.x
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.2

People

(Reporter: cpratt, Assigned: gordon)

Details

Build ID: 2000100720, 2000100428 (Mtrunk), 2000102308 (Mtrunk), others To reproduce: - Launch Mozilla - Create a new profile in the default directory - Change your home page (I used http://uk.yahoo.com) - Quit Mozilla - Move the profile folder to the Desktop (or any other location) - Start Mozilla * Switch back to the Finder at this point and look at the location which used to contain the profile folder. You'll see that a file has been created in that location with type of ???? and creator of MOSS. The file will have the same name as the name of the profile folder you moved. If you open that file in BBEdit, you'll see that it contains the HTML source code of the page you had previously selected to be your home page. - Once Mozilla has started, note that although you may see some of your home page, images will not load (at least not images that are defined by relative links in the HTML source). Dynamic images, eg. banner adds, may load - Quit Mozilla and launch it a second time. Result: The home page is not loaded. Typing in its URL manually will also fail to load the page. If you look at the Preferences (and the bookmarks.html file), the URL you specified for the home page is still there, but you simply have no way of loading it in the browser. If you throw away the file that was created (the one with the same name as the profile, the one created in the original location of the profile folder), you will be able to load the home page (again without images) at the next launch, but at the launch after that the browser will fail to load anything.
I could reproduce this in 2000-10-24-08 Trunk Mac build.
Unlikely that ben should own this.
Netscape Nav triage team: this is not a Netscape beta stopper. reassigning to ccarlen
Assignee: ben → ccarlen
Keywords: nsbeta1-
I have see this before and think that it's a cache problem. By deleting the cache folder, pages I had visited before rendered. I'll look for a bug on it.
Will investigate.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.8
> * Switch back to the Finder at this point and look at the location which used > to contain the profile folder. You'll see that a file has been created in that > location with type of ???? and creator of MOSS. The file will have the same > name as the name of the profile folder you moved. If you open that file in > BBEdit, you'll see that it contains the HTML source code of the page you had > previously selected to be your home page. Just tried this and it happens as described. Looking into it, it is the necko disk cache which is making the file with the name of the profile. That would explain why it contains the contents of the supposed home page - it wasn't found, so we went and fetched a new copy and tried to cache it - in the wrong place. The nsLocalFileMac object which was wrongly created was initialized with a full path. Since the cache dir was no longer in that path, the path was resolved incorrectly into an FSSpec - possibly an nsLocalFileMac bug. Have to look into that a bit more. I'm pretty sure nsLocalFileMac returns an error when a path cannot be resolved but maybe it was ignored. I'd still say it's a cache problem. Also, changing the summary. From what I have seen, any page which has been cached will not load (or at least images on it) will not load if the cache dir is moved.
Summary: Can't load home page if profile folder moved → Can't load cached pages if cache dir gets moved
It's a cache problem - not profile or nsIDirectoryService.
Assignee: ccarlen → neeti
Status: ASSIGNED → NEW
Component: Bookmarks → Networking: Cache
QA Contact: claudius → gordon
Target Milestone: mozilla0.8 → mozilla0.9
Cache bugs to Gordon
Assignee: neeti → gordon
Target Milestone: mozilla0.9 → mozilla0.9.1
Moving to 0.9.2, though it will probably get fixed with pref/profile cleanup for 0.9.1.
Target Milestone: mozilla0.9.1 → mozilla0.9.2
This appears fixed with the new disk cache. I'm able to move my profile to the desktop, launch mozilla, and browse cached pages. about:cache reports the cache directory is in the profile directory on the desktop. Marking FIXED.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.