Make WordPress Core


Ignore:
Timestamp:
03/17/2014 08:16:40 PM (13 years ago)
Author:
nacin
Message:

Filesystem: Fix getchmod() for direct and ssh2 transports, for directories.

props DavidAnderson.
fixes #26598.

File:
1 edited

Legend:

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

    r26869 r27566  
    195195         *
    196196         * @param string $file Path to the file.
    197          * @return string Mode of the file (last 4 digits).
     197         * @return string Mode of the file (last 3 digits).
    198198         */
    199199        function getchmod($file) {
    200                 return substr(decoct(@fileperms($file)),3);
     200                return substr( decoct( @fileperms( $file ) ), -3 );
    201201        }
    202202
Note: See TracChangeset for help on using the changeset viewer.