[wp-trac] [WordPress Trac] #48960: failed to open dir: No such file or directory in WIndows
WordPress Trac
noreply at wordpress.org
Sat Dec 14 18:32:04 UTC 2019
#48960: failed to open dir: No such file or directory in WIndows
-------------------------------+------------------------------
Reporter: eden159 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.3.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by azaozz):
Looking at this further, it seems caused by unreadable temp directory when
using `wp_tempnam()`.
In addition `wp_tempnam()` seem to be called from a plugin that is
(perhaps) writing couple of files to the disk on every wp-admin page load.
Not sure why this is needed but it's a pretty bad performance.
To fix this and similar cases perhaps the last filename check in
`wp_unique_filename()` should be done only when the file is going to be in
the uploads dir. In addition, perhaps `scandir()` should be silenced as
there might be cases where it will fail regardless.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48960#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list