Skip to content

Commit 034d644

Browse files
committed
fix: mkfile() returns the full path when none of its parents were made
Signed-off-by: Yejin Seo <yejseo01@arm.com>
1 parent 2a646f7 commit 034d644

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pkg/simulator/filesystem.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ func mkfile(path string, perm os.FileMode) (string, error) {
101101
return "", err
102102
}
103103
defer file.Close()
104-
return dir, nil
104+
if dir == "" {
105+
return path, nil
106+
} else {
107+
return dir, nil
108+
}
109+
105110
}
106111

107112
func mkdirAll(path string, perm os.FileMode) (string, error) {

0 commit comments

Comments
 (0)