https://bz.apache.org/bugzilla/show_bug.cgi?id=64313

            Bug ID: 64313
           Summary: htcacheclean: Empty directories in CacheRoot are still
                    present even after using "-t"
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: support
          Assignee: bugs@httpd.apache.org
          Reporter: pprok...@redhat.com
  Target Milestone: ---

Created attachment 37145
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37145&action=edit
Delete already empty directories when process_dir runs

Current Behaviour of htcacheclean utility with -t flag:

1. If a cache file exists, try to remove it.
2. If removing a cache file is successful, check if a parent directory is
empty.
3. If parent directory is empty, try to remove it.

Therefore, if there is an empty directory in the cache root directory, it is
not removed, even though "-t" is set.

For example, if you have /var/cache/httpd/Rp/3q/QnF3NbrMDHc6c3kmCQ.header, the
QnF3NbrMDHc6c3kmCQ.header file is removed, then the 3q directory is removed and
the Rp directory is removed.
if you have the empty directory /var/cache/httpd/7Y/BK, neither BK and 7Y is
removed.

Proposed patch attached

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to