Skip to content

Instantly share code, notes, and snippets.

@pvhee
Last active October 22, 2015 10:48
Show Gist options
  • Save pvhee/0c29a17cf7d4d3df5642 to your computer and use it in GitHub Desktop.
Save pvhee/0c29a17cf7d4d3df5642 to your computer and use it in GitHub Desktop.
is_writable_stream_wrapper_nfs_fix.patch
diff --git a/includes/file.inc b/includes/file.inc
index d3ac87e..81459fa 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -443,7 +443,7 @@ function file_prepare_directory(&$directory, $options = FILE_MODIFY_PERMISSIONS)
return FALSE;
}
// The directory exists, so check to see if it is writable.
- $writable = is_writable($directory);
+ $writable = is_writable(drupal_realpath($directory));
if (!$writable && ($options & FILE_MODIFY_PERMISSIONS)) {
return drupal_chmod($directory);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment