Opened 10 years ago

Closed 9 years ago

#1080 closed defect (wontfix)

Unable to purge disk cache on Windows

Reported by: loafier Owned by: loafier
Priority: Low Milestone:
Component: Polipo Version: 1.0
Severity: Keywords:
Cc: loafier, arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by phobos)

Polipo should be run with the -x switch periodically to remove or
truncate cache files to keep the cache tree from growing too large.
However, on Windows, Polipo fails with this error:
Couldn't fts_open disk cache: Function not implemented

GDB indicates that the failure occurs when fts_open() calls
change_to_dir(). change_to_dir() relies on the fchdir() syscall,
which seems to have no analog on Windows. Therefore, change_to_dir()
remains unimplemented on that platform.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (2)

comment:1 Changed 10 years ago by loafier

Had some luck with this:

diff -rN -u old-polipo-gsoc-work/fts_compat.c new-polipo-gsoc-work/fts_compat.c
--- old-polipo-gsoc-work/fts_compat.c Mon Aug 31 14:26:49 2009
+++ new-polipo-gsoc-work/fts_compat.c Mon Aug 31 14:26:49 2009
@@ -131,8 +131,21 @@

change_to_dir(DIR *dir)

  • errno = ENOSYS;
  • return -1;

+ char path[MAX_PATH];
+ size_t len;
+ /* Ugly hack: access dirent's private members, removing the search
+ * suffix MinGW adds to the path */
+ len = strlen(dir->dd_name);
+ len--;
+ if (len > sizeof(path)-1) {
+ return -1;
+ }
+ strncpy(path, dir->dd_name, len);
+ path[len] = '\0';
+ return chdir(path);


comment:2 Changed 9 years ago by phobos

Description: modified (diff)
Resolution: Nonewontfix
Status: newclosed

Juliusz has taken over polipo maintenance again. He's asked the authors of existing bugs to email them to his mailing list at

Note: See TracTickets for help on using tickets.