Skip to content

Commit 97140df

Browse files
committed
removed redundancy in the code
1 parent acd6071 commit 97140df

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

internal/orchestrator/repo/repo.go

+6-15
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"strings"
1212
"sync"
1313
"time"
14-
"runtime"
1514

1615
v1 "github.com/garethgeorge/backrest/gen/go/v1"
1716
"github.com/garethgeorge/backrest/internal/cryptoutil"
@@ -316,20 +315,12 @@ func (r *RepoOrchestrator) Restore(ctx context.Context, snapshotId string, snaps
316315
dir := path.Dir(normalizedPath)
317316
base := path.Base(normalizedPath)
318317

319-
if runtime.GOOS == "windows" {
320-
if dir != "" {
321-
snapshotId = snapshotId + ":" + dir
322-
}
323-
if base != "" {
324-
opts = append(opts, restic.WithFlags("--include", base))
325-
}
326-
} else {
327-
if dir != "" {
328-
snapshotId = snapshotId + ":" + dir
329-
}
330-
if base != "" {
331-
opts = append(opts, restic.WithFlags("--include", base))
332-
}
318+
319+
if dir != "" {
320+
snapshotId = snapshotId + ":" + dir
321+
}
322+
if base != "" {
323+
opts = append(opts, restic.WithFlags("--include", base))
333324
}
334325
}
335326

0 commit comments

Comments
 (0)