From: Andre Noll Date: Sun, 6 Jul 2008 22:23:36 +0000 (+0200) Subject: score_update(): Don't return an error if file is not admissible. X-Git-Tag: v0.3.3~52^2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=d3989f99f26082c8e69dddcc9be13b7c4d09421d;p=paraslash.git score_update(): Don't return an error if file is not admissible. This function is called whenever the afs_info struct changed, for example if the user executed a touch command. Simply ignore the request to update the score in case the file is not contained in the score table. --- diff --git a/score.c b/score.c index 0e18a1b9..f2a28b75 100644 --- a/score.c +++ b/score.c @@ -182,6 +182,8 @@ int score_update(const struct osl_row *aft_row, long percent) .size = sizeof(aft_row)}; int ret = osl_get_row(score_table, SCORECOL_AFT_ROW, &obj, &row); + if (ret == -E_RB_KEY_NOT_FOUND) /* not an error */ + return 1; if (ret < 0) return ret; ret = get_num_admissible_files(&n);