Skip to content

Commit

Permalink
Fixed Google Docs bug, creates a folder properly and test file properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mendhak committed Mar 30, 2014
1 parent 413c07e commit a3149fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void run()
if(Utilities.IsNullOrEmpty(gpsLoggerFolderId))
{
//Couldn't find folder, must create it
gpsLoggerFolderId = CreateEmptyFile(token, "GPSLogger For Android", GetMimeTypeFromFileName(fileName), "root");
gpsLoggerFolderId = CreateEmptyFile(token, "GPSLogger For Android", "application/vnd.google-apps.folder", "root");

if(Utilities.IsNullOrEmpty(gpsLoggerFolderId))
{
Expand Down Expand Up @@ -475,6 +475,10 @@ private String GetMimeTypeFromFileName(String fileName){
return "application/zip";
}

if(fileName.endsWith("xml")){
return "application/xml";
}

return "application/vnd.google-apps.spreadsheet";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ private void UploadTestFileToGoogleDocs()
gpxFolder.mkdirs();
}

Utilities.LogDebug("Creating gpslogger_test.xml");
File testFile = new File(gpxFolder.getPath(), "gpslogger_test.xml");

try
Expand Down

0 comments on commit a3149fa

Please sign in to comment.