-
Notifications
You must be signed in to change notification settings - Fork 51
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
sync symlink creation/update fails if the symlink points to a nonexistant file #150
Comments
this should do it: --- a/helper.go
+++ b/helper.go
@@ -84,7 +84,7 @@ func Fatalf(s string) {
// fileExists checks if the given file exists and returns a bool
func fileExists(file string) bool {
//Debugf("checking for file existence " + file)
- if _, err := os.Stat(file); os.IsNotExist(err) {
+ if _, err := os.Lstat(file); os.IsNotExist(err) {
return false
}
return true |
The great war of the g10k 0.8.x rewrite and symlinks continues... Thanks for catching that. |
though depending on your other code it may be safer to add a new function that explicitly only tests existance and rename the fileExists to fileReadable? |
thanks it works now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the sync fails if you have an an environment that has symlink pointing to a not existing file
it fails with:
g10k 0.8.3
The text was updated successfully, but these errors were encountered: