mirror of
https://github.com/rclone/rclone.git
synced 2025-03-28 12:42:08 +02:00
config: Fix save of temp file under Windows - fixes #1458
This commit is contained in:
parent
7693cecd17
commit
b047402294
@ -16,7 +16,6 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
"path"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
@ -590,7 +589,7 @@ func changeConfigPassword() {
|
|||||||
// SaveConfig saves configuration file.
|
// SaveConfig saves configuration file.
|
||||||
// if configKey has been set, the file will be encrypted.
|
// if configKey has been set, the file will be encrypted.
|
||||||
func SaveConfig() {
|
func SaveConfig() {
|
||||||
dir, name := path.Split(ConfigPath)
|
dir, name := filepath.Split(ConfigPath)
|
||||||
f, err := ioutil.TempFile(dir, name)
|
f, err := ioutil.TempFile(dir, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to create temp file for new config: %v", err)
|
log.Fatalf("Failed to create temp file for new config: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user