Changeset 1194


Ignore:
Timestamp:
Feb 20, 2007, 12:38:16 PM (13 years ago)
Author:
bruno
Message:

Fix a problem in is_this_file_compressed where the result of a function wan't tested.
this function is still wrong :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-files.c

    r1186 r1194  
    12161216    char *tmp = NULL;
    12171217    char *p = NULL;
    1218 
    1219     malloc_string(do_not_compress_these);
     1218    char *q = NULL;
     1219
     1220    q = strrchr(filename, '.');
     1221    if (q == NULL) {
     1222        return (FALSE);
     1223    }
     1224
    12201225    mr_asprintf(&tmp, "%s/do-not-compress-these", g_mondo_home);
    12211226    if (!does_file_exist(tmp)) {
     
    12231228        return (FALSE);
    12241229    }
     1230    malloc_string(do_not_compress_these);
    12251231    /* BERLIOS: This is just plain WRONG !! */
    12261232    strcpy(do_not_compress_these,last_line_of_file(tmp));
     
    12321238            *(strchr(tmp, ' ')) = '\0';
    12331239        }
    1234         if (!strcmp(strrchr(filename, '.'), tmp)) {
     1240        if (!strcmp(q, tmp)) {
    12351241            mr_free(do_not_compress_these);
    12361242            mr_free(tmp);
Note: See TracChangeset for help on using the changeset viewer.