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

SplFileInfo::getMTime(): stat failed #13

Open
burzum opened this issue Mar 25, 2015 · 0 comments
Open

SplFileInfo::getMTime(): stat failed #13

burzum opened this issue Mar 25, 2015 · 0 comments

Comments

@burzum
Copy link

burzum commented Mar 25, 2015

I'm using Robo and it's file watcher, which uses your lib to track the changes. Sometimes, in random cases, when the file was changed this error comes up:

SplFileInfo::getMTime(): stat failed
\src\Lurker\Resource\DirectoryResource.php:30

I've seen that Symfonys caching suffered from a similar issue, I'm not sure if this will help here as well but maybe it can help fixing the issue. See symfony/symfony@c6e9e06

However, I can't reproduce it as it seems to happen randomly and not very often. I'm using php 5.6 and 5.5 and it happens with both versions. I'm running it on Windows 8. But I've seen that it seems like you're already checking if the file exists.

My guess is that phpstorm, which is sometimes terrible slow, still accesses the file while the change was already detected by the script but phpstorm didn't unlock it at this time.

So maybe an additional check on the lock might solve the issue? See http://stackoverflow.com/questions/9863118/check-if-a-file-is-already-locked-using-flock

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