Advertisement
Guest User

Untitled

a guest
Apr 29th, 2021
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. --- abiword-3.0.4/src/af/util/xp/ut_go_file.cpp 2021-04-29 13:06:35.196255120 -0700
  2. +++ abiword-3.0.4/src/af/util/xp/ut_go_file.cpp 2021-04-29 13:08:07.790716736 -0700
  3. @@ -1002,6 +1002,12 @@
  4. GFile *f = g_file_new_for_uri (uri);
  5. char *basename = g_file_get_basename (f);
  6. g_object_unref (G_OBJECT (f));
  7. + if (!basename) // Try again since the "uri" might just be a plain path.
  8. + {
  9. + f = g_file_new_for_path (uri);
  10. + basename = g_file_get_basename (f);
  11. + g_object_unref (G_OBJECT (f));
  12. + }
  13. #elif defined(GOFFICE_WITH_GNOME)
  14. char *raw_uri = gnome_vfs_unescape_string (uri, G_DIR_SEPARATOR_S);
  15. char *basename = raw_uri ? g_path_get_basename (raw_uri) : NULL;
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement