Possible bug with GAM get drivefile and file extensions.

75 views
Skip to first unread message

Robert Hook

unread,
Feb 3, 2023, 12:26:44 PM2/3/23
to GAM for Google Workspace
Running Windows 10 pro, 128 GB RAM, GAM Version 6.31.

I've written a script to download files from a Google drive account while preserving the user's folder structure.  It seems to work but in the process I've found a potential bug.  When downloading using get drivefile, certain files will have their extensions appended the the name of the file without a ".".  So if the file name was "hud changes and upgrades.drawio", GAM retrieves as "hud changes and upgradsdrawio".  So the extension becomes part of the file name.  I've noticed it with htmls too.  It doesn't do this with every file and I can't find any logic behind which files it fails with and which it doesn't, but it's consistent.  If a file downloaded this way, that same file will always download that way and I've tested in just by running it very simply from a command line.  I note that the "title" entry in the downloaded file list shows the file without any extension but the extension is found in the fileExtension and fullFileExtension fields.  GAM must be figuring that out but then appends them improperly.

Am I doing something wrong or is this an actual bug?  I've downloaded thousands of files with it and this appears to happen on a relatively small but not insignificant percentage of them, but I haven't calculated that percent yet.

Ian Hyzy

unread,
Feb 3, 2023, 12:32:02 PM2/3/23
to GAM for Google Workspace
are the files that get messed up all types that are associated with a third-party app like drawio (or html which has a few third party apps), or does the issue happen with .pdfs and native docs file formats too? 

Robert Hook

unread,
Feb 3, 2023, 1:12:10 PM2/3/23
to GAM for Google Workspace
I've not found any examples of this with pdf, doc, docx, xls, xlsx, png, ods or odt files.  Out of 2746 files downloaded, I've found 7 instances of this with drawio files and 5 instances with html files.  That's a pretty low percentage but I'm doing this in support of a legal case so I have to be as accurate and thorough as possible.

Ian Hyzy

unread,
Feb 7, 2023, 2:45:23 PM2/7/23
to GAM for Google Workspace
No idea if this will help, but because it's only hitting those two files types, have you tried running the script again after removing any third-party apps on the account that can handle those files? And do you see the issue happen with the same files more than once of it it different files / random each time? 

Ross Scroggs

unread,
Feb 7, 2023, 2:51:46 PM2/7/23
to google-ap...@googlegroups.com
Robert,

Send me a Meet/Zoom invitation and I'll look into this with you.

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/711be111-86ce-4214-b47c-5eb8188a1e04n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages