summaryrefslogtreecommitdiff
path: root/includes/stream_wrappers.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/stream_wrappers.inc')
-rw-r--r--includes/stream_wrappers.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc
index 7df1f9dc6..3c88f3d8f 100644
--- a/includes/stream_wrappers.inc
+++ b/includes/stream_wrappers.inc
@@ -341,7 +341,11 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
* Base implementation of chmod().
*/
function chmod($mode) {
- return @chmod($this->getLocalPath(), $mode);
+ $output = @chmod($this->getLocalPath(), $mode);
+ // We are modifying the underlying file here, so we have to clear the stat
+ // cache so that PHP understands that URI has changed too.
+ clearstatcache();
+ return $output;
}
/**