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

Broken symbolic links in directory cause SplFileInfo::getMTime to fail #1254

Closed
indigoxela opened this issue Jan 17, 2017 · 2 comments
Closed

Comments

@indigoxela
Copy link

Hi,
just realized this problem: if a directory below user/pages/ contains a broken symbolic link, I get a fatal error:
SplFileInfo::getMTime(): stat failed for /bla/bla/file...

This is easy to reproduce. Create a symbolic link, remove the link target file.
Condition: the broken symlink must contain ".md" somewhere in its name.

Examples:
.what-ever-name.mdfoo-bar.txt
.what-ever-name.mdfoo-bar.end

This problem even occurs with dot-files and with "ignore_hidden" set to true.
And ".md" can be anywhere in the filename, not only as an ending.

How can I solve that?

Possibly grav should be a bit stricter when parsing directories?

@indigoxela
Copy link
Author

indigoxela commented Jan 17, 2017

Another important condition for above error to occur:

cache:
  enabled: true 
  check:
    method: file

So this is actually a caching problem.

My workaround for now is to set cache.method: to folder.

@flaviocopes
Copy link
Contributor

Thanks for reporting

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

2 participants