What steps will reproduce the problem?
1.Get a folder's identifier when the folder is not trashed
GTLQueryDrive *queryFilesList = [GTLQueryDrive queryForFilesList];
queryFilesList.q = [NSString stringWithFormat:@"mimeType='application/vnd.google-apps.folder' and title='%@' and 'root' in parents and trashed=false", strFolderName];
2.Remove the folder in Mac's Finder(I have installed the Google Drive client,
So I can see Google Drive folder in Finder)
3.Upload a new file in the trashed folder with identifier which is coming from
step 1
GTLDriveFile *file = [GTLDriveFile object];
file.title = strUploadingName;
file.descriptionProperty = [NSString stringWithFormat:@"Uploaded from %@", [self GetUploadFolderName]] ;
file.mimeType = @"audio/x-caf";
GTLDriveParentReference *parentRef = [GTLDriveParentReference object];
parentRef.identifier = self.strFolderID; // identifier property of the folder, coming from step 1
file.parents = @[ parentRef ];
GTLUploadParameters *uploadParameters = [GTLUploadParameters uploadParametersWithFileHandle:fileHandle MIMEType:file.mimeType];
GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:file
uploadParameters:uploadParameters];
self.uploadTicket = [self.driveService executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLDriveFile *insertedFile, NSError *error) {}
4.Query the new file with "trashed=false" when uploading is done. Because the
new file is in a trashed folder, it should have trashed attribute. So the query
result should have no item. But it actually have a new item.
GTLQueryDrive *queryFilesList = [GTLQueryDrive queryForFilesList];
queryFilesList.q = [NSString stringWithFormat:@"title='%@' and '%@' in parents and trashed=false", strUploadingName, strFolderID];
CLog(@"Upload upload check : %d", bCheckBeforeUpload);
self.uploadTicket = [self.driveService executeQuery:queryFilesList completionHandler:^(GTLServiceTicket *ticket,
GTLDriveFileList *files,
NSError *error)
{}
What is the expected output? What do you see instead?
Query a new uploaded file in a trashed folder with 'trashed=false' should get
no item. But I actually get the new file even 'trashed=false' is set in the
query command.
Original issue reported on code.google.com by recorder...@gmail.com on 29 Aug 2014 at 2:33
Original issue reported on code.google.com by
recorder...@gmail.com
on 29 Aug 2014 at 2:33