mirror of
https://github.com/minio/mc.git
synced 2025-11-28 08:03:56 +03:00
Fix Windows config path (#2898)
Remove '.exe' (case insensitive) from executable name for consistent config folder. Potentially breaking: If people (for whatever reason) used 'mc.exe', this will potentially break their setup.
This commit is contained in:
@@ -105,7 +105,10 @@ func Main(args []string) {
|
||||
|
||||
// Set the mc app name.
|
||||
appName := filepath.Base(args[0])
|
||||
|
||||
if runtime.GOOS == "windows" && strings.HasSuffix(strings.ToLower(appName), ".exe") {
|
||||
// Trim ".exe" from Windows executable.
|
||||
appName = appName[:strings.LastIndex(appName, ".")]
|
||||
}
|
||||
// Run the app - exit on error.
|
||||
if err := registerApp(appName).Run(args); err != nil {
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user