mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'master' of github.com:cyingfan/wtf into cyingfan-master
This commit is contained in:
commit
a6da089bec
@ -37,7 +37,7 @@ func CreateFile(fileName string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
filePath := fmt.Sprintf("%s/%s", configDir, fileName)
|
||||
filePath := filepath.Join(configDir, fileName)
|
||||
|
||||
// Check if the file already exists; if it does not, create it
|
||||
_, err = os.Stat(filePath)
|
||||
@ -106,7 +106,7 @@ func LoadWtfConfigFile(filePath string) *config.Config {
|
||||
// chmodConfigFile sets the mode of the config file to r+w for the owner only
|
||||
func chmodConfigFile() {
|
||||
configDir, _ := WtfConfigDir()
|
||||
relPath := fmt.Sprintf("%s%s", configDir, WtfConfigFile)
|
||||
relPath := filepath.Join(configDir, WtfConfigFile)
|
||||
absPath, _ := expandHomeDir(relPath)
|
||||
|
||||
_, err := os.Stat(absPath)
|
||||
|
Loading…
x
Reference in New Issue
Block a user