Skip to content

Commit

Permalink
fix potential crash in Google Drive storage
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippC committed Apr 10, 2019
1 parent d074932 commit b0f6103
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,14 @@ public String getDisplayName()
String part = parts[parts.length-1];
logDebug("parsing part " + part);
int indexOfSeparator = part.lastIndexOf(NAME_ID_SEP);
String name = "";
if (indexOfSeparator < 0)
{
//seems invalid, but we're very generous here
displayName += "/"+part;
}
String name = part.substring(0, indexOfSeparator);
else
name = part.substring(0, indexOfSeparator);
try {
name = decode(name);
} catch (UnsupportedEncodingException e) {
Expand Down

0 comments on commit b0f6103

Please sign in to comment.