From f9b83d8d67856f392071d5f58f51e8ab690b9ccb Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 27 Mar 2025 19:44:42 -0400 Subject: [PATCH] providers/os: Function rename converts the destination path properly --- providers/os/os.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/os/os.go b/providers/os/os.go index ed6179a..060dc55 100644 --- a/providers/os/os.go +++ b/providers/os/os.go @@ -40,7 +40,7 @@ func (this *Provider) FuncMapFor (document *step.Document) template.FuncMap { "appendFile": stat.funcAppendFile, "removeFile": stat.funcRemoveFile, "rename": stat.funcRename, - // TODO: createDir, createDirAll, removeDir, chmod + // TODO: temporary files, dirs } } @@ -159,6 +159,8 @@ func (this *state) funcRemoveFile (name string) error { func (this *state) funcRename (name, newName string) error { name, err := this.document.Rel(name) if err != nil { return err } + newName, err = this.document.Rel(newName) + if err != nil { return err } return os.Rename(name, newName) }