- Issue created by @catch
- Status changed to Closed: duplicate
almost 2 years ago 8:24am 13 July 2023
Opening as minor because it's a log annoyance but a few people have noticed it, e.g. #3301573-52: Remove the aggregate stale file threshold and state entry β and #3369979-45: Drupal 10.1 breaks Bootstrap β .
vendor/bin/drush cr
[notice] The file assets://css was not deleted because it does not exist.
[notice] The file assets://js was not deleted because it does not exist.
in < 10.1, we used to iterate over the files in those directories and run a callback to delete the files or not.
Now we can just remove all files in the directories, but ::deleteRecursive() logs a notice if a directory doesn't exist that you're trying to delete. This could happen if you drush cr multiple times without visiting an HTML page for example.
If this method is called and the directory is already empty, we don't need to empty it again, so we could just check file_exists() - even if there's a race condition and another process created the directory immediately after our file_exists() check, that's no different to if they'd tried to create the directory immediately after we'd attempted to delete the non-existent one.
Closed: duplicate
11.0 π₯