mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-26 13:49:14 +08:00
base: try to correct 'no such file or directory' error
This commit is contained in:
parent
58ae6f4d1b
commit
a3dab5ec13
@ -383,7 +383,7 @@ func (c *ClassifierSerializer) WriteMetadataAtPrefix(prefix string, metadata Cla
|
||||
func CreateSerializedClassifierStub(filePath string, metadata ClassifierMetadataV1) (*ClassifierSerializer, error) {
|
||||
|
||||
// Open the filePath
|
||||
f, err := os.OpenFile(filePath, os.O_RDWR|os.O_TRUNC, 0600)
|
||||
f, err := os.OpenFile(filePath, os.O_RDWR|os.O_TRUNC|os.O_CREAT, 0600)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user