-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tmp folder flooded with downloaded Font files (when using SFTP). #11
Comments
Do you have a folder that you can actually write to on the filesystem? I had a similar issue when testing this as I was on a (mostly) unwritable system with just a select few locations I could store the fonts in. This was merged and was the solution for me: https://github.com/WPTT/webfont-loader/pull/6/files |
@pattonwebz Problem is that the folder is writable on the system by the webserver. But you're remark inspired me.. Why not change the WPTT code like this? $success = is_writable(dirname($font_path)) ? rename($tmp_path, $font_path) : false;
if( !$success) $success = $this->get_filesystem()->move( $tmp_path, $font_path, true ); |
This was done using the |
Issue description:
When using an SFTP filesystem backend the tmp-file directory is flooded with dowloaded google font files
(When using SFTP without storing the password, Wordpress asks for password when updating plugins etc.)
Version used:
The version that's from the 'master branch'. It seems that's the latest version that is updated via Wordpress plugins.
(Develop branch is totally different)
Description:
(Copied from themeum/kirki#2375).
It seems this repository is the base of the webfont-loader
In class
WPTT_WebFont_Loader
(line 343)The library tries to move the tmp file via the wp_filesystem
This fails, because the SFTP cannot login. (and on the frontend no password-dialog is used)
This results in a tmp folder with endless numbers of files.
Hacky fix for now is to move it directly without the filesystem. (wp-content/fonts should be writable by the webserver)
This resolves my issue.
But it would be nice if it was possible to configure the library, to not use the wp-filesystem to move this temp file. Because in some cases the filesystem needs input from the administrator.
Maybe it should be configurable by a configuration switch?
The text was updated successfully, but these errors were encountered: