fix: backup file under root dir

This commit is contained in:
Samuel N Cui
2023-10-21 13:52:43 +08:00
parent ecfce735c6
commit 51f88fe33e
2 changed files with 1 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func (a *jobArchiveExecutor) applyParam(ctx context.Context, param *entity.JobAr
sources := make([]*entity.SourceState, 0, len(param.Sources)*8)
for _, src := range param.Sources {
src.Base = strings.TrimSpace(src.Base)
if src.Base[0] != '/' {
if src.Base == "" || src.Base[0] != '/' {
src.Base = path.Join(a.exe.paths.Source, src.Base) + "/"
}
a.logger.Infof("walk source start, source_path= '%s'", src.RealPath())