Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#10775 closed defect (bug) (fixed)

Plugin/Theme installer: Do not bail if empty destination directory exists

Reported by: dd32's profile dd32 Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

At present, If you attempt to install a plugin or theme, and the destination directory already exists (Say from a failed upgrade), Then the installer will bail.

Patch adds a check to simply use the folder if it exists AND is empty.

However, It still counts hidden files as being a item in a directory, so if a .svn folder or .htaccess file exists in the folder, the installer will bail. - Any thoughts on that? Should it continue if there are only hidden files? I'm thinking not at present.

Attachments (1)

10775.diff (1.1 KB) - added by dd32 16 years ago.

Download all attachments as: .zip

Change History (5)

@dd32
16 years ago

#1 @dd32
16 years ago

However, It still counts hidden files as being a item in a directory, so if a .svn folder or .htaccess file exists in the folder, the installer will bail.

Note that such a case would exist from a failed upgrade due to #10774 - It shouldnt happen in the future.. or it'd only be from a upgrade that failed 70% through..

#2 @azaozz
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11926]) Plugin/Theme installer: Do not bail if empty destination directory exists, props dd32, fixes #10775

#3 @azaozz
16 years ago

Changed the logic a bit, no need to clear_destination when it doesn't exist.

#4 @dd32
16 years ago

Changed the logic a bit, no need to clear_destination when it doesn't exist.

Very good point, Looks good to me.

Note: See TracTickets for help on using tickets.