1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-24 08:44:52 +00:00

Fix loading config on sftp backend

This commit is contained in:
Alexander Neumann 2015-05-14 18:08:45 +02:00
parent 3517229844
commit 4e5094b7c9

View file

@ -323,10 +323,6 @@ func (r *SFTP) dirname(t backend.Type, name string) string {
// Get returns a reader that yields the content stored under the given
// name. The reader should be closed after draining it.
func (r *SFTP) Get(t backend.Type, name string) (io.ReadCloser, error) {
if name == "" {
return nil, errors.New("unable to load empty name")
}
// try to open file
file, err := r.c.Open(r.filename(t, name))
if err != nil {