Changeset 2994 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-filesystem.php
- Timestamp:
- 04/21/2016 07:41:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-filesystem.php
r2640 r2994 40 40 * Extract a ZIP file to a directory. 41 41 * 42 * @param string $zip_file The ZIP file to extract.43 * @param string $ temp_directory The Directory to extract the ZIP to. Optional. Default: A Temporary directory.42 * @param string $zip_file The ZIP file to extract. 43 * @param string $directory The Directory to extract the ZIP to. Optional. Default: A Temporary directory. 44 44 * 45 45 * @return string The directory the ZIP was extracted to. … … 103 103 * @param string $dir The directory to remove. 104 104 * 105 * @return bool Whether the directory was removed. .105 * @return bool Whether the directory was removed. 106 106 */ 107 107 public static function rmdir( $dir ) { 108 if ( !trim( $dir, '/' ) ) {109 return;108 if ( trim( $dir, '/' ) ) { 109 exec( 'rm -rf ' . escapeshellarg( $dir ) ); 110 110 } 111 exec( 'rm -rf ' . escapeshellarg( $dir ) );112 111 113 112 return is_dir( $dir ); 114 113 } 115 116 114 }
Note: See TracChangeset
for help on using the changeset viewer.