Closed Bug 769231 Opened 12 years ago Closed 8 years ago

Don't try creating offline cache directories or stat()ing offline cache files

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: glandium, Unassigned)

Details

When reading files from the offline cache, this is what can be seen system-wise:
7841  mkdir("/data/local/OfflineCache/8", 0700) = -1 EEXIST (File exists) <0.000054>
7841  mkdir("/data/local/OfflineCache/8/2", 0700) = -1 EEXIST (File exists) <0.000043>
7841  stat64("/data/local/OfflineCache/8/2/6B4B9618C0EBED-0", {st_mode=S_IFREG|0644, st_size=4782, ...}) = 0 <0.000045>
7834  open("/data/local/OfflineCache/8/2/6B4B9618C0EBED-0", O_RDONLY|O_LARGEFILE) = 91 <0.000070>

(Interestingly, the open doesn't happen in the same thread)

When *reading* from the offline cache, the two mkdirs don't need to be done. The stat doesn't either: opening the file will either succeed or fail, depending on whether the file is there. (except if, maybe, we're interested in the timestamp).

I don't know what happens when writing, but if the same pattern happens, we could also open the file first, and create the directories if that fails.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.