[wp-trac] [WordPress Trac] #10424: change get_filesystem_method()'s code for direct to reflect actual purpose

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 27 04:37:42 UTC 2010


#10424: change get_filesystem_method()'s code for direct to reflect actual purpose
--------------------------+-------------------------------------------------
 Reporter:  dd32          |       Owner:  dd32                   
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  3.0                    
Component:  Filesystem    |     Version:  2.9                    
 Severity:  normal        |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------
Changes (by dd32):

  * keywords:  needs-patch => has-patch needs-testing
  * milestone:  Future Release => 3.0


Comment:

 I think i've discovered the reason i originally didnt use fileowner().

 fileowner() may return (int)0 as the fileowner on windows systems.
 getuid() may return a different value however (I believe).

 I'm attaching a patch which I believe should work under most situations.

 The addition of the is_writable() check should prevent the (int)0
 ownership issues I hope, PHP should be able to determine it cant write to
 the target path even in that case.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10424#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list