Skip to content

Commit

Permalink
Minor fixes to README and main file after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico204 committed Sep 2, 2021
1 parent ef639aa commit a933653
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To learn how to use restic backup client with REST backend, please consult [rest
--tls-key string TLS key path
-V, --version output version and exit

By default the server persists backup data in the O.S. temporary directory (`/tmp/restic` on Linux/BSD and others, in `%TEMP%\\restic` in Windows, etc). To start the server with a custom persistence directory and with authentication disabled:
By default the server persists backup data in the OS temporary directory (`$TMPDIR/restic` on Linux/BSD and others when `TMPDIR` is not empty, `/tmp/restic` otherwise; `%TEMP%\\restic` in Windows, etc). To start the server with a custom persistence directory and with authentication disabled:

rest-server --path /user/home/backup --no-auth

Expand Down
6 changes: 3 additions & 3 deletions changelog/unreleased/pull-158
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Bugfix: Use os.TempDir() for temporary directory in default path
Bugfix: Use platform-specific temporary directory in default path

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

https://github.com/restic/rest-server/issues/157
https://github.com/restic/rest-server/pull/158
2 changes: 1 addition & 1 deletion cmd/rest-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var cmdRoot = &cobra.Command{
}

var server = restserver.Server{
Path: fmt.Sprintf("%s%c%s", os.TempDir(), os.PathSeparator, "restic"),
Path: filepath.Join(os.TempDir(), "restic"),
Listen: ":8000",
}

Expand Down

0 comments on commit a933653

Please sign in to comment.