php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #910 Stat Cache not appropriate after unlink operation
Submitted: 1998-11-10 19:03 UTC Modified: 1998-11-10 19:13 UTC
From: medwards at iname dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.5 OS: Linux 2.0.34 (RH)
Private report: No CVE-ID: None
 [1998-11-10 19:03 UTC] medwards at iname dot com
--- link.c.old	Mon Oct  5 01:22:17 1998
+++ link.c	Tue Nov 10 23:53:58 1998
@@ -175,6 +175,7 @@
 		php3_error(E_WARNING, "Unlink failed (%s)", strerror(errno));
 		RETURN_FALSE;
 	}
+	php3_clearstatcache(INTERNAL_FUNCTION_PARAM_PASSTHRU);
 	RETURN_TRUE;
 }
 

might be a possible fix for this one... If I do an unlink operation on a file that I have been statting (i.e. file_exists()) and I stat right after I have unlinked it, the file seems to still exist after I have unlinked it, because the cache is still active. This is a work-around, and no doubt you guys have a far more elegant solution in mind....

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-10 19:13 UTC] rasmus
Fixed - Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 09:01:33 2024 UTC