disk_free_space() should not be required

jazzslider - November 5, 2009 - 17:29
Project:Storage API
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:jbrown
Status:needs review
Description

Was just trying this module out on a test site with PHP safe_mode enabled, and I noticed that the filesystem storage service uses the disk_free_space() function to determine how much free space is available. While this is certainly useful information, it triggers an error when disk_free_space() is unavailable.

I wrote a simple patch that addresses the issue; however, I haven't really looked at the rest of the code base, so I can't confirm that this doesn't break anything else …does this look like a good idea?

Alternatively, if the module is going to require functions like this that are disabled in certain security setups, it may be worth adding a note to the documentation about it.

Thanks!
Adam

AttachmentSize
disk_free_space.patch931 bytes

#1

jbrown - November 5, 2009 - 22:08
Assigned to:Anonymous» jbrown

Its actually a requirement for Drupal to be run without safe mode: http://drupal.org/requirements

If there is demand for storage_api to work with safe mode, then I'll support it.

 
 

Drupal is a registered trademark of Dries Buytaert.