Hello,
I am working at implementing the safe app API in rust, so far I can auth, de-auth, create, read, delete directories, and create, delete files. ( I am quite happy with this yet ! )
I hit something weird , though
when I create a file in a directory, say “testfile.txt” in “/dirtest”, it seems the ‘isPrivate’ field is not written.
After successfully creating the file, if I read the “/dirtest” directory, my rust app panicks and complain about missing isPrivate field.
I triple checked, though, that I DO write this field :
App: Begin creating file…
create_file_data = CreateFileData { filePath: “/dirtest/testfile.txt”, isPrivate: true, metadata: “”, isVersioned: false, isPathShared: false }
App: CreateFile encoded
200 OK …File was created
…
App: GetDir Response JSON: “{"info":{"name":"dirtest","isPrivate":true,"isVersioned":false,"createdOn":1459530484879,"modifiedOn":1459533655710,"metadata":""},"files":[{"name":"testfile.txt","size":0,"createdOn":1459533655710,"modifiedOn":1459533655710,"metadata":""}],"subDirectories":}”
thread ‘’ panicked at ‘MissingFieldError(“isPrivate”)’, safestuff.rs:435
line 435 is when I try to decode the json into my homebrew object :
let get_dir_response: GetDirResponseData = rustc_serialize::json::decode(&decrypted_response_json_str)
.unwrap_or_else(|e| panic!(“{:?}”, e));
any idea ?