[gnome-builder] git: send FileNotFound for missing files in repository



commit f24de5870db2b97d507b130f97b226b33d85f5b7
Author: Christian Hergert <chergert redhat com>
Date:   Mon Apr 22 16:02:46 2019 -0700

    git: send FileNotFound for missing files in repository

 src/plugins/git/daemon/ipc-git-change-monitor-impl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/git/daemon/ipc-git-change-monitor-impl.c 
b/src/plugins/git/daemon/ipc-git-change-monitor-impl.c
index b7aa04777..8c53dd06f 100644
--- a/src/plugins/git/daemon/ipc-git-change-monitor-impl.c
+++ b/src/plugins/git/daemon/ipc-git-change-monitor-impl.c
@@ -246,8 +246,10 @@ gerror:
 
   if (g_error_matches (error, GGIT_ERROR, GIT_ENOTFOUND))
     {
-      g_clear_error (&error);
-      ret = g_variant_take_ref (g_variant_new_array (G_VARIANT_TYPE ("u"), NULL, 0));
+      g_dbus_method_invocation_return_dbus_error (invocation,
+                                                  "org.freedesktop.DBus.Error.FileNotFound",
+                                                  "No such file");
+      return TRUE;
     }
 
   if (error != NULL && error->domain != G_IO_ERROR)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]