Skip to content

Commit

Permalink
fix windows snapshot folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Son Roy Almerol committed Nov 11, 2024
1 parent 7a4d32a commit 3693d03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/windows_agent/systray.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (p *agentTray) onReady(url string) func() {
} else {
status.SetTitle("Status: Server URL needs to be set.")
}
time.Sleep(time.Second)
time.Sleep(5 * time.Second)
}
}
}(p.ctx, status, &url)
Expand Down
4 changes: 2 additions & 2 deletions internal/agent/snapshots/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func getVSSFolder() (string, error) {
tmpDir := os.TempDir()

configBasePath := filepath.Join(tmpDir, "pbs-plus")
configBasePath := filepath.Join(tmpDir, "pbs-plus-vss")

err := os.MkdirAll(configBasePath, os.ModePerm)
if err != nil {
Expand All @@ -38,7 +38,7 @@ func Snapshot(driveLetter string) (*WinVSSSnapshot, error) {
return nil, fmt.Errorf("Snapshot: error getting app data folder -> %w", err)
}

snapshotPath := filepath.Join(vssFolder, "VSS", driveLetter)
snapshotPath := filepath.Join(vssFolder, driveLetter)
err = vss.CreateLink(snapshotPath, volName)
if err != nil {
if strings.Contains(err.Error(), "shadow copy operation is already in progress") {
Expand Down

0 comments on commit 3693d03

Please sign in to comment.