Skip to content
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

rmdir() failing on directory not empty #22

Open
mikeschinkel opened this issue Nov 11, 2017 · 0 comments
Open

rmdir() failing on directory not empty #22

mikeschinkel opened this issue Nov 11, 2017 · 0 comments

Comments

@mikeschinkel
Copy link

I'm trying to use psysh which uses 0.1 of this library and each time I run it I get:

PHP Warning:  rmdir(/var/folders/.../T/php-xdg-runtime-dir-fallback-mschinkel): Directory not empty in phar:///usr/local/bin/psysh/build-vendor/dnoegel/php-xdg-base-dir/src/Xdg.php on line 110
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/psysh:0
PHP   2. Psy\{closure}() /usr/local/bin/psysh:141
PHP   3. Psy\Shell->run() phar:///usr/local/bin/psysh/src/Psy/functions.php:325
PHP   4. Psy\Shell->initializeTabCompletion() phar:///usr/local/bin/psysh/src/Psy/Shell.php:247
PHP   5. Psy\Shell->addTabCompletionMatchers() phar:///usr/local/bin/psysh/src/Psy/Shell.php:990
PHP   6. Psy\Shell->getTabCompletionMatchers() phar:///usr/local/bin/psysh/src/Psy/Shell.php:224
PHP   7. Psy\Shell->all() phar:///usr/local/bin/psysh/src/Psy/Shell.php:200
PHP   8. Psy\Shell->init() phar:///usr/local/bin/psysh/build-vendor/symfony/console/Application.php:641
PHP   9. Psy\Shell->getDefaultCommands() phar:///usr/local/bin/psysh/build-vendor/symfony/console/Application.php:1163
PHP  10. Psy\Configuration->getRuntimeDir() phar:///usr/local/bin/psysh/src/Psy/Shell.php:185
PHP  11. Psy\ConfigPaths::getRuntimeDir() phar:///usr/local/bin/psysh/src/Psy/Configuration.php:348
PHP  12. XdgBaseDir\Xdg->getRuntimeDir() phar:///usr/local/bin/psysh/src/Psy/ConfigPaths.php:153
PHP  13. rmdir() phar:///usr/local/bin/psysh/build-vendor/dnoegel/php-xdg-base-dir/src/Xdg.php:110

Looking at your code on line 110 it seems you are doing an rmdir() on a directory containing files.

Maybe you could replace with this from StackOverflow?

@mikeschinkel mikeschinkel changed the title rmdir(/var/folders/.../php-xdg-runtime-dir-fallback-mschinkel): Directory not empty in dnoegel/php-xdg-base-dir/src/Xdg.php rmdir(/var/folders/.../php-xdg-runtime-dir-fallback-...): Directory not empty in dnoegel/php-xdg-base-dir/src/Xdg.php Nov 11, 2017
@mikeschinkel mikeschinkel changed the title rmdir(/var/folders/.../php-xdg-runtime-dir-fallback-...): Directory not empty in dnoegel/php-xdg-base-dir/src/Xdg.php rmdir() failing on directory not empty Nov 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant