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

Fix TYPO3 project detection to work with non existent symlinks, fixes #4326 #4330

Merged
merged 1 commit into from Oct 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkg/ddevapp/typo3.go
Expand Up @@ -152,9 +152,18 @@ func setTypo3SiteSettingsPaths(app *DdevApp) {

// isTypoApp returns true if the app is of type typo3
func isTypo3App(app *DdevApp) bool {
if _, err := os.Stat(filepath.Join(app.AppRoot, app.Docroot, "typo3")); err == nil {
typo3Folder := filepath.Join(app.AppRoot, app.Docroot, "typo3")

// Check if the folder exists, fails if a symlink target does not exist.
if _, err := os.Stat(typo3Folder); !os.IsNotExist(err) {
return true
}

// Check if a symlink exists, succeeds even if the target does not exist.
if _, err := os.Lstat(typo3Folder); !os.IsNotExist(err) {
return true
}

return false
}

Expand Down