WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#14182 closed defect (bug) (fixed)

Plugin Upgrade doesnt delete previous directory if it differs from the upgrade directory

Reported by: hakre Owned by:
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description (last modified by dd32)

If some plugins are residing in their own directory and the auto-update is run, the updater installs the update into another directory.

This leaves two plugins in the same install afterwards. Looks like the updater is not taking the current plugin directory into account.

Change History (11)

comment:1 @hakre5 years ago

Related: #14179

Related: #13928

comment:2 @hakre5 years ago

Related: #11495

comment:3 @hakre5 years ago

Errata: First "directory" in ticket's Description must be "plugin".

comment:4 @dd325 years ago

  • Description modified (diff)

Correct, The plugin upgrader has -always- installed into a directory based on the .org slug, Thats by design.

The plugin should still be deleted however, even if its in a different named folder.

comment:5 @dd325 years ago

  • Component changed from General to Upgrade/Install
  • Milestone changed from Awaiting Review to 3.1
  • Summary changed from Plugins Upgraded into wrong directory to Plugin Upgrade doesnt delete previous directory if it differs from the upgrade directory

Confirmed that its not deleting the plugin in 3.0.

comment:6 @dd325 years ago

  • Keywords needs-patch added

Was working in 2.8, Broke in 2.9.

comment:7 @jane5 years ago

If anyone's planning to patch this for 3.1, please post what you've got so people can help move it forward before we hit freeze for this release.

comment:8 @nacin4 years ago

  • Milestone changed from 3.1 to Future Release

No patch.

comment:9 @dd324 years ago

  • Keywords needs-patch removed
  • Milestone changed from Future Release to 3.2

traced this back to this commit: [11926] Plugin/Theme installer: Do not bail if empty destination directory exists, props dd32, fixes #10775

The changes made resulted in the filter only running when the destination exists (Which in this case, it doesn't)

comment:10 @dd324 years ago

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

(In [17590]) When upgrading plugins|themes, if the new destination folder is different from the previous folder, delete the old folder upon upgrade. Fixes #14182

comment:11 @dd324 years ago

(In [17591]) Remove debug cruft from [17590]. See #14182

Note: See TracTickets for help on using tickets.