summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-07-09 00:04:58 +0800
committerxuri <xuri.me@gmail.com>2021-07-09 00:04:58 +0800
commit2ced00d6a82f993094858e60127d4f817ad788e3 (patch)
tree82b36f5896facefffb04c91a3422abcc6498f338 /file.go
parent4f0d676eb765472d1fe7a29cacd165b982785bd2 (diff)
This closes #872, support re-save the new spreadsheet after `SaveAs`
Diffstat (limited to 'file.go')
-rw-r--r--file.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.go b/file.go
index 1786e27..abb0305 100644
--- a/file.go
+++ b/file.go
@@ -68,6 +68,7 @@ func (f *File) SaveAs(name string, opt ...Options) error {
if len(name) > MaxFileNameLength {
return ErrMaxFileNameLength
}
+ f.Path = name
file, err := os.OpenFile(name, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666)
if err != nil {
return err