Error in filebased cache culling
| Reported by: |
witek@… |
Owned by: |
Anssi Kääriäinen <akaariai@…> |
|
Component:
|
Core (Cache system)
|
Version:
|
dev
|
|
Severity:
|
Normal
|
Keywords:
|
|
|
Cc:
|
|
Triage Stage:
|
Accepted
|
|
Has patch:
|
no
|
Needs documentation:
|
no
|
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
In line 115 of filebased.py we have:
try:
filelist = sorted(os.listdir(self._dir))
except (IOError, OSError):
return
if self._cull_frequency == 0:
doomed = filelist
else:
doomed = [os.path.join(self._dir, k) for (i, k) in enumerate(filelist) if i % self._cull_frequency == 0]
In case of _cull_frequency == 0 instead of "doomed = filelist" we should have sth like:
doomed = [os.path.join(self._dir, d) for d in filelist]
Otherwise doomed tuple will not contains absolute paths but relative.
Change History
(12)
| Easy pickings: |
unset
|
| Triage Stage: |
Unreviewed → Accepted
|
| Owner: |
changed from nobody to Nikolay Zakharov
|
| Status: |
new → assigned
|
| UI/UX: |
unset
|
| Patch needs improvement: |
set
|
| Patch needs improvement: |
unset
|
| Owner: |
Nikolay Zakharov removed
|
| Status: |
assigned → new
|
| Has patch: |
unset
|
| Version: |
1.3 → master
|
| Owner: |
set to Anssi Kääriäinen <akaariai@…>
|
| Resolution: |
→ fixed
|
| Status: |
new → closed
|
See also #15825. Not exactly related, but right around in that same part of code and probably worth fixing at the same time.