From 28077fa501a190d38907b133e06ef45ea9ec927b Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Thu, 3 Oct 2013 22:46:38 +0100
Subject: [PATCH] Issue #2099671 by salvis: Fixed Windows 7 and
 MTimeProtectedFileStorage has problems.

---
 core/lib/Drupal/Component/PhpStorage/FileStorage.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/lib/Drupal/Component/PhpStorage/FileStorage.php b/core/lib/Drupal/Component/PhpStorage/FileStorage.php
index bdc2621f5178..dbfa12d0344c 100644
--- a/core/lib/Drupal/Component/PhpStorage/FileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/FileStorage.php
@@ -133,8 +133,8 @@ public function deleteAll() {
    */
   protected function unlink($path) {
     if (file_exists($path)) {
-      // Ensure the file / folder is writable.
       if (is_dir($path)) {
+        // Ensure the folder is writable.
         @chmod($path, 0777);
         foreach (new \DirectoryIterator($path) as $fileinfo) {
           if (!$fileinfo->isDot()) {
@@ -143,6 +143,8 @@ protected function unlink($path) {
         }
         return @rmdir($path);
       }
+      // Windows needs the file to be writable.
+      @chmod($path, 0700);
       return @unlink($path);
     }
     // If there's nothing to delete return TRUE anyway.
-- 
GitLab