bearyg / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

File attribute "starred" appears to never be set #852

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client (e.g. 1.15.0-rc)?
google-apiservices-drive-v2-rev110--1.17.0-rc

Java environment (e.g. Java 6, Android 2.3, App Engine)?
appengine-api-1.0-sdk-1.8.4
Java 1.7

Describe the problem.
Executing:
Files.List fileList = service.files().list().setQ(mimeType = 'image/jpeg' and 
'0BwVZ_b1U-EryTVhuSVZMNXlwR28' in parents and trashed = false and starred = 
true);

This returns no results. If I remove "and starred = true" I get 600+ results. 
When I view the image in my browser on Drive, it is clearly starred. Also, if I 
search my Drive folder for "is:starred" the file is returned. 

I also wrote a brief junit test to run through all of the files to check the 
getStarred() value in the label:
results = ds.retrieveFiles(service.getDriveService(), typeImage, 
"0BwVZ_b1U-EryTVhuSVZMNXlwR28", true);
for(File s : results)
{
    if(s.getId().equals("0BwVZ_b1U-EryS0YyWXJCUWNLSlU"))
    {
        System.out.println("got the file");
        System.out.println(s.getLabels().getStarred().booleanValue());
    }
}

The block above writes:
got the file
false

I starred this file today, and it is the only file in my Drive folder with a 
star.

How would you expect it to be fixed?
When the line is executed, any file within the folder with a star should be 
returned.

Original issue reported on code.google.com by Erin.Ost...@gmail.com on 11 Jan 2014 at 6:51

Attachments: