Git-updater: Plugin can't copy for sites having FS_METHOD != direct

Created on 25 Jul 2020  路  11Comments  路  Source: afragen/git-updater

Hi, as you were replacing the $wp_filesystem->move() by your own function a new problem appeared. For those who are using FS_METHOD with "direct", it is working like a charm. But for all the others (FS_METHOD=ftpext,...) the function is running endles until the server dies because you are copying as long as there are files left. My debug.log grows every time over 1GB ;)

Most helpful comment

Works like a charm !! 馃憤
You are doing a great job !

All 11 comments

Thank you. I think I see a solution. I'll try to get a fix in the develop branch soon. I'll ping this thread so you can test.

Should I assume that that updates happen correctly, just that the debug.log fills with these messages?

No updates can't be installed because there files can't be copied.
Debug.log is my own choice, I needed to see why everything crashes ;)

If you use FS_METHOD = direct, what happens?

Your error seems to show that no files are in the download directory or rather that the download directory doesn't exist.

It works without any problem. If FS_METHOD is f.ex. ftpext, it turns infinite because you are using unlink,etc instead of the Wordpress filesystem.
Sure there are files ... ;)

The initial error seems to be the opendir() fails and this returns a boolean (false). LMK if the change still updates the plugin and doesn't litter your logs.

The logs are not the problem, I will disable them as soon as the site will work in production. If there is no problem, the logs won't be flooded ;)

Can I ask why not use the direct method? Does it not work for you?

I have another thought on fixing for ftpext and others but I won't be able to patch until later.

LMK how v9.7.1.3 of the develop branch works for you.

Works like a charm !! 馃憤
You are doing a great job !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NoWorries picture NoWorries  路  5Comments

alexclassroom picture alexclassroom  路  5Comments

soderlind picture soderlind  路  10Comments

andruwa13 picture andruwa13  路  3Comments

picasso picture picasso  路  9Comments