You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
os.Stat, os.ReadDir should not fail when a file does not existΒ #15019
I'm fixing some related issue in this package, and stumbled upon this. A side comment: We should probably consider if these file funcs are worth keeping; there are known issues and most if not all usage can be replaced with the resources API.
changed the title [-]os.Stat should not fail when a file does not exist[/-][+]os.Stat, os.ReadDir should not fail when a file does not exist[/+]on Jun 9, 2026
I don't understand this Bug description, why do symlinks, which points to a file (I don't speak about stale symlinks), be a problem?
The result is really bad. To avoid to duplicate big data, I use symlinks in the "static" directory. This doesn't work any longer.
Since hugo also does not preserve hardlinks, this is becoming a real disk space issue.
Reacted by Marek Omasta and Personal websites and projects
I agree on this, I've been using symlinks for the same purpose for years now.
Hardlinks still work, but data gets duplicated when I archive and unzipped projects.
The fix is more damaging than the issues, which I never encountered.
And by the way, symlinks also fail in assets. There is no alternative. Symlinks are much simpler often than modules.
I hope for a reversion.
Activity
[-]os.Stat should not fail when a file does not exist[/-][+]os.Stat, os.ReadDir should not fail when a file does not exist[/+]Drop symlinks in os.ReadDir, os.ReadFile, os.Stat and os.FileExists
Drop symlinks in os.ReadDir, os.ReadFile, os.Stat and os.FileExists
Drop symlinks in os.ReadDir, os.ReadFile, os.Stat and os.FileExists
thkukuk commentedon Jun 28, 2026
I don't understand this Bug description, why do symlinks, which points to a file (I don't speak about stale symlinks), be a problem?
The result is really bad. To avoid to duplicate big data, I use symlinks in the "static" directory. This doesn't work any longer.
Since hugo also does not preserve hardlinks, this is becoming a real disk space issue.
nnsite commentedon Jul 24, 2026
I agree on this, I've been using symlinks for the same purpose for years now.
Hardlinks still work, but data gets duplicated when I archive and unzipped projects.
The fix is more damaging than the issues, which I never encountered.
And by the way, symlinks also fail in assets. There is no alternative. Symlinks are much simpler often than modules.
I hope for a reversion.
github-actions commentedon Sep 2, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.