diff options
-rw-r--r-- | packaging/menu-daemon.spec | 4 | ||||
-rw-r--r-- | src/pkg_event.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packaging/menu-daemon.spec b/packaging/menu-daemon.spec index 1e373ae..91e0e94 100644 --- a/packaging/menu-daemon.spec +++ b/packaging/menu-daemon.spec @@ -6,7 +6,7 @@ Name: menu-daemon Summary: Menu daemon Version: 0.2.43 Release: 1 -Group: TO_BE/FILLED_IN +Group: apps License: Flora Software License Source0: menu-daemon-%{version}.tar.gz BuildRequires: pkgconfig(ail) @@ -39,7 +39,7 @@ menu-daemon (Grab H/W key, Package manifest file parsing) %setup -q %build -export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--hash-style=both -Wl,--as-needed" +export LDFLAGS+="-Wl,--hash-style=both -Wl,--as-needed" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} make %{?jobs:-j%jobs} diff --git a/src/pkg_event.c b/src/pkg_event.c index 51f5cb6..93fed03 100644 --- a/src/pkg_event.c +++ b/src/pkg_event.c @@ -93,7 +93,6 @@ directory_notify(void* data, Ecore_Fd_Handler* fd_handler) while (i < len) { struct inotify_event* event = (struct inotify_event*) &buf[i]; char *str_potksed = "potksed."; - char *cut; char *package = NULL; ssize_t idx; int nev_name; @@ -107,15 +106,16 @@ directory_notify(void* data, Ecore_Fd_Handler* fd_handler) nev_name --; } - if (str_potksed[idx] != '\0') { + if (str_potksed[idx] != '\0' || nev_name < 0) { _D("This is not a desktop file : %s", event->name); i += sizeof(struct inotify_event) + event->len; continue; } package = strdup(event->name); - cut = strstr(package, ".desktop"); - *cut = '\0'; + break_if(NULL == package); + + package[nev_name + 1] = '\0'; _D("Package : %s", package); // add & update |