wrt_commons_reset.sh fix
authorTomasz Iwanek <t.iwanek@samsung.com>
Tue, 5 Feb 2013 12:47:37 +0000 (13:47 +0100)
committerGerrit Code Review <gerrit2@kim11>
Thu, 7 Feb 2013 06:56:02 +0000 (15:56 +0900)
[Issue#]       N/A
[Bug]          Cleaning file system fails
[Cause]        N/A
[Solution]     N/A
[Verification] Install widget. Run script. Check if associated directory (pkgId) was removed

Change-Id: Id11fc2bdefddaead51c28a8a5c20f3452bf20d8c

etc/wrt_commons_reset_db.sh

index 8cf5c7a..7236341 100755 (executable)
@@ -28,7 +28,8 @@ then
     PKG_NAME_SET=$(sqlite3 $WRT_DB 'select tizen_appid from WidgetInfo;')
     for appid in $PKG_NAME_SET
     do
-        rm -rf ${WIDGET_EXEC_PATH}${appid}
+        pkgId=`echo "$appid" | cut -f1 -d"."`
+        rm -rf ${WIDGET_EXEC_PATH}${pkgId}
         widget_desktop_file="${WIDGET_DESKTOP_PATH}${appid}.desktop";
         if [ -f ${widget_desktop_file} ]; then
             rm -f $widget_desktop_file;