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)
%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}
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;
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