Skip to content

Commit 40bb1eb

Browse files
committed
Minor fixes to README and main file after review
1 parent 3f1343c commit 40bb1eb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

changelog/unreleased/pull-158

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Bugfix: Use os.TempDir() for temporary directory in default path
1+
Bugfix: Use platform-specific temporary directory in default path
22

33
Instead of using hardcoded value for temporary directory, rest-server now uses
4-
Go stdlib `os.TempDir()` function, which returns the correct temporary path for
5-
all platforms.
4+
Go standard library functions to retrieve the temporary directory path for the
5+
current platform.
66

77
https://github.com/restic/rest-server/issues/157
88
https://github.com/restic/rest-server/pull/158

cmd/rest-server/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var cmdRoot = &cobra.Command{
2727
}
2828

2929
var server = restserver.Server{
30-
Path: fmt.Sprintf("%s%c%s", os.TempDir(), os.PathSeparator, "restic"),
30+
Path: filepath.Join(os.TempDir(), "restic"),
3131
Listen: ":8000",
3232
}
3333

0 commit comments

Comments
 (0)