Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
28077fa5
Commit
28077fa5
authored
Oct 03, 2013
by
alexpott
Browse files
Issue
#2099671
by salvis: Fixed Windows 7 and MTimeProtectedFileStorage has problems.
parent
1402c663
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Component/PhpStorage/FileStorage.php
View file @
28077fa5
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment