diff options
author | Jin Yoon <jinny.yoon@samsung.com> | 2012-09-04 13:22:25 +0900 |
---|---|---|
committer | Jin Yoon <jinny.yoon@samsung.com> | 2012-09-04 13:35:02 +0900 |
commit | 2f9e3d2a573231404324a2e23fb4c2def0b835ba (patch) | |
tree | a2d086b82523fe2638efd442c6cac9e9438d98cc | |
parent | 744bc53e172e83ead1217b2e1c1f0f45f66f5188 (diff) | |
download | menu-daemon-2f9e3d2a573231404324a2e23fb4c2def0b835ba.tar.gz menu-daemon-2f9e3d2a573231404324a2e23fb4c2def0b835ba.tar.bz2 menu-daemon-2f9e3d2a573231404324a2e23fb4c2def0b835ba.zip |
modify the routines for checking the extension of filenamesubmit/tizen/20130529.220625submit/master/20120920.150946accepted/tizen/20130530.1647532.0_alphamaster2.0alpha
Change-Id: I0f90f2f9aebf2c7e05ecc5910fee4a3f29bc522b
-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 |