WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/24/2015 04:48:18 AM (6 years ago)
Author:
dd32
Message:

WP Filesystem: Correctly parse the permissions field in the directory listings, and actually set it in FTP environments
Props mnelson4 for initial patch.
Fixes #29548

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-base.php

    r32654 r32923  
    311311     */
    312312    public function gethchmod( $file ){
    313         $perms = $this->getchmod($file);
     313        $perms = intval( $this->getchmod( $file ), 8 );
    314314        if (($perms & 0xC000) == 0xC000) // Socket
    315315            $info = 's';
     
    353353
    354354    /**
     355     * Gets the permissions of the specified file or filepath in their octal format
     356     *
     357     * @since 4.0
     358     * @param string $file
     359     * @return string the last 3 characters of the octal number
     360     */
     361    public function getchmod( $file ) {
     362        return '777';
     363    }
     364
     365    /**
    355366     * Convert *nix-style file permissions to a octal number.
    356367     *
Note: See TracChangeset for help on using the changeset viewer.