问题
I have createa a small app that reads and writes files using the Google Drive Android API. Locally on one client, everything works fine: I store files using the Drive API, and read them back on the next start without any issues ever. However, when I read the same files on a different device with the same App, the files are corrupted sometimes. The files are JSON files, and the parser complains about missing quotes or braces. If I look at the files using the Google Drive Web interface, I can verify that the file content is not valid. It looks like old content gets partially overwritten with new file content.
Could this somehow be a user issue? I think this may be a Drive API issue because locally, everything is fine, and the API does not seem to provide a way to store invalid data remotely but valid data locally. The first step for filing a bug against the Google Drive API seems to be to get StackOverflow consensus, so I'd also be interested if anybody else is seeing a similar problem.
So my questions are:
- Can this possibly be a user issue (if so, how)?
- Has anybody else seen similar problems?
回答1:
Seems to actually have been a Drive API issue, which is fixed now.
For details, see https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3696
来源:https://stackoverflow.com/questions/27697741/what-could-be-the-cause-for-remote-data-corruption-when-using-the-google-drive-a