gdummyfile: Return NULL from get_basename() if no path is stored

Rather than returning a URI, which definitely won’t be a valid basename.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2328
This commit is contained in:
Philip Withnall 2021-03-10 19:10:04 +00:00
parent c80528f17b
commit 628e1c5893

View File

@ -126,7 +126,7 @@ g_dummy_file_get_basename (GFile *file)
if (dummy->decoded_uri)
return g_path_get_basename (dummy->decoded_uri->path);
return g_strdup (dummy->text_uri);
return NULL;
}
static char *