[wp-trac] [WordPress Trac] #50349: Plugin Update deletes plugin and showing "could not delete old plugin" message.

WordPress Trac noreply at wordpress.org
Fri Apr 21 14:06:08 UTC 2023


#50349: Plugin Update deletes plugin and showing "could not delete old plugin"
message.
--------------------------+------------------------------
 Reporter:  apedog        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  6.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by jgangso):

 * version:   => 6.2


Comment:

 The method `\Plugin_Upgrader::delete_old_plugin()` which is responsible
 for deleting the old plugin does its job by recursively listing files and
 removing them one by one. In the end it checks if the directory got
 removed as a whole. If it didn't, it returns false.

 This becomes an issue f. ex. with NFS mounts where the removed file is
 replaced with a temporary .nfsXXXXXXXXX file if the file has a write-lock
 on it (for any reason).

 From the file systems perspective it's fine. The file system will take
 care of removing the .nfsXXXXXXXXX files whenever the locks are released.
 Wordpress in turn considers this as a failure and terminates the process.

 Just writing it here for the note. I don't have a solution at hand, but
 we'll need to look at this closer in our project, so I might
 update/comment on the issue later on.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50349#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list