Skip to content

WriteProtoToTextFile writes nothing when the target file does not exist #341

@beam2d

Description

@beam2d

I found that caffe::WriteProtoToTextFile(const Message& proto, const char* filename) does not write anything if filename does not indicate an existing file, due to use of open(2) with O_WRONLY at https://github.com/BVLC/caffe/blob/master/src/caffe/util/io.cpp#L46. I think this behavior is unintuitive (and also inconsistent with its binary version). Is it intended? If not, I want to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions