/* Fix a string to only have the file name, removing starting at the first space of whatever is quoted. */
CHAR16* FixFileName(IN CHAR16 *FileName)
/* Fix a string to only have the file name, removing starting at the first space of whatever is quoted. */
CHAR16* FixFileName(IN CHAR16 *FileName)
{
  CHAR16  *Copy;
  CHAR16  *TempLocation;
  if (FileName == NULL) {
    return (NULL);
  }
  if (FileName[0] == L'\"') {
    Copy = FileName+1;
    if ((TempLocation = StrStr (Copy, L"\"")) != NULL) {
      TempLocation[0] = CHAR_NULL;
    }
  } else {
    Copy = FileName;
    while (Copy[0] == L' ') {
      Copy++;
    }
    if ((TempLocation = StrStr (Copy, L" ")) != NULL) {
      TempLocation[0] = CHAR_NULL;
    }
  }
  if (Copy[0] == CHAR_NULL) {
    return (NULL);
  }
  return (Copy);
}