@ -1268,6 +1268,20 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e
}
}
}
}
// Create/Remove git-daemon-export-ok for git-daemon...
daemonExportFile := path . Join ( repo . RepoPath ( ) , ` git-daemon-export-ok ` )
if repo . IsPrivate && com . IsExist ( daemonExportFile ) {
if err = os . Remove ( daemonExportFile ) ; err != nil {
log . Error ( 4 , "Failed to remove %s: %v" , daemonExportFile , err )
}
} else if ! repo . IsPrivate && ! com . IsExist ( daemonExportFile ) {
if f , err := os . Create ( daemonExportFile ) ; err != nil {
log . Error ( 4 , "Failed to create %s: %v" , daemonExportFile , err )
} else {
f . Close ( )
}
}
forkRepos , err := getRepositoriesByForkID ( e , repo . ID )
forkRepos , err := getRepositoriesByForkID ( e , repo . ID )
if err != nil {
if err != nil {
return fmt . Errorf ( "getRepositoriesByForkID: %v" , err )
return fmt . Errorf ( "getRepositoriesByForkID: %v" , err )