[Groonga-commit] groonga/groonga [master] remove associated path as the default behavior of grn_obj_remove(). fixes #1180

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 23日 (水) 20:21:41 JST


Kouhei Sutou	2011-11-23 11:21:41 +0000 (Wed, 23 Nov 2011)

  New Revision: acd91107f8e07e06afdf5f2d7e5dfd15e119283e

  Log:
    remove associated path as the default behavior of grn_obj_remove(). fixes #1180

  Modified files:
    lib/db.c

  Modified: lib/db.c (+3 -0)
===================================================================
--- lib/db.c    2011-11-22 10:07:01 +0000 (44f47aa)
+++ lib/db.c    2011-11-23 11:21:41 +0000 (bdf0e16)
@@ -6125,6 +6125,9 @@ grn_obj_remove(grn_ctx *ctx, grn_obj *obj)
         grn_ja_put(ctx, ((grn_db *)db)->specs, id, NULL, 0, GRN_OBJ_SET, NULL);
         grn_obj_delete_by_id(ctx, db, id, 1);
       }
+      if (path) {
+        grn_io_remove(ctx, path);
+      }
       grn_obj_touch(ctx, db, NULL);
     } else {
       grn_obj_close(ctx, obj);




Groonga-commit メーリングリストの案内
Back to archive index