Skip to content

Commit

Permalink
only use base path
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Nov 18, 2024
1 parent 9057f01 commit 428ad1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/store/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func (storeInstance *Store) GetMostRecentTask(ctx context.Context, job *Job) (ch
searchString := fmt.Sprintf(":backup:%s%shost-%s", job.Store, encodeToHexEscapes(":"), encodeToHexEscapes(backupId))
log.Printf("Checking %s == %s\n", event.Name, searchString)
if strings.Contains(event.Name, searchString) {
colonSplit := strings.Split(event.Name, ":")
fileName := filepath.Base(event.Name)
colonSplit := strings.Split(fileName, ":")
actualUpid := colonSplit[:9]
newTask, err := storeInstance.GetTaskByUPID(strings.Join(actualUpid, ":") + ":")
if err != nil {
Expand Down

0 comments on commit 428ad1e

Please sign in to comment.