5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-05 05:21:03 +08:00

fix windows cross volume init (#3512)

changelog
This commit is contained in:
Atterpac 2024-05-25 00:20:42 -06:00 committed by GitHub
parent 1d2e1b15ea
commit 940d0f1906
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View File

@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed cross volume project install for windows by [atterpac](https://github.com/atterac) in [#3512](https://github.com/wailsapp/wails/pull/3512)
- Fixed react template css to show footer by [atterpac](https://github.com/atterpac) in [#3477](https://github.com/wailsapp/wails/pull/3477)
- Fixed zombie processes when working in devmode by updating to latest refresh by [Atterpac](https://github.com/atterpac) in [#3320](https://github.com/wailsapp/wails/pull/3320).
- Fixed appimage webkit file sourcing by [Atterpac](https://github.com/atterpac) in [#3306](https://github.com/wailsapp/wails/pull/3306).

View File

@ -201,20 +201,27 @@ func getRemoteTemplate(uri string) (template *Template, err error) {
}
func Install(options *flags.Init) error {
var wd string = lo.Must(os.Getwd())
var projectDir string
if options.ProjectDir == "." || options.ProjectDir == "" {
projectDir = lo.Must(os.Getwd())
projectDir = wd
} else {
projectDir = options.ProjectDir
}
var err error
projectDir, err = filepath.Abs(filepath.Join(options.ProjectDir, options.ProjectName))
projectDir, err = filepath.Abs(filepath.Join(projectDir, options.ProjectName))
if err != nil {
return err
}
// Calculate relative path from project directory to LocalModulePath
var relativePath string
// Check if the project directory and LocalModulePath are in the same drive
if filepath.VolumeName(wd) != filepath.VolumeName(debug.LocalModulePath) {
relativePath = debug.LocalModulePath
} else {
relativePath, err = filepath.Rel(projectDir, debug.LocalModulePath)
}
if err != nil {
return err
}