forked from Silverfish/proton-bridge
Windows needs txt suffix
This commit is contained in:
committed by
Jakub Cuth
parent
f59f68f894
commit
e3332d1cb6
@ -231,11 +231,15 @@ func (c *Config) getLicenseFilePath() string {
|
|||||||
}
|
}
|
||||||
return "/Applications/" + appName + "/Contents/Resources/LICENSE"
|
return "/Applications/" + appName + "/Contents/Resources/LICENSE"
|
||||||
case "windows":
|
case "windows":
|
||||||
|
path := filepath.Join(filepath.Dir(os.Args[0]), "LICENSE.txt")
|
||||||
|
if _, err := os.Stat(path); err == nil {
|
||||||
|
return path
|
||||||
|
}
|
||||||
// This should not happen, Windows should be handled by relative
|
// This should not happen, Windows should be handled by relative
|
||||||
// location to the binary above. This is just fallback which may
|
// location to the binary above. This is just fallback which may
|
||||||
// or may not work, depends where user installed the app and how
|
// or may not work, depends where user installed the app and how
|
||||||
// user started the app.
|
// user started the app.
|
||||||
return filepath.FromSlash("C:/Program Files/Proton Technologies AG/ProtonMail Bridge/LICENSE")
|
return filepath.FromSlash("C:/Program Files/Proton Technologies AG/ProtonMail Bridge/LICENSE.txt")
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user