Making WordPress.org

Changeset 10785


Ignore:
Timestamp:
03/05/2021 01:18:20 AM (3 years ago)
Author:
dd32
Message:

Theme Directory: Fix theme uploads where new files were failing to be added/deleted when the theme added/deleted a file which included a space in the filename.

This caused some themes to fail to commit new files added when the theme contained a file named similar to assets/js/custom.min copy.js.
This would have also caused some theme uploads to fail to remove a file, if that file contained a space too.

Themes with new files which did not contain a space were unaffected.
Themes with files deleted which did not contain a space were unaffected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r10722 r10785  
    968968
    969969        // Process file additions and removals.
    970         exec( self::SVN . " st {$new_version_dir} | grep '^?' | cut -c 2- | xargs " . self::SVN . " add" );
    971         exec( self::SVN . " st {$new_version_dir} | grep '^!' | cut -c 2- | xargs " . self::SVN . " rm" );
     970        exec( self::SVN . " st {$new_version_dir} | grep '^?' | cut -c 2- | xargs -I{} " . self::SVN . " add {}" );
     971        exec( self::SVN . " st {$new_version_dir} | grep '^!' | cut -c 2- | xargs -I{} " . self::SVN . " rm {}" );
    972972
    973973        // Commit it to SVN.
Note: See TracChangeset for help on using the changeset viewer.