1375 |
} |
} |
1376 |
|
|
1377 |
free(filename); |
free(filename); |
1378 |
|
|
1379 |
|
} else if(strcasecmp(ext, ".zip") == 0) { |
1380 |
|
char *filename = malloc(strlen(dirname)+strlen(finfo->name)+2); |
1381 |
|
|
1382 |
|
strcpy(filename, dirname); |
1383 |
|
if(strlastchr(filename) != '/') |
1384 |
|
strcat(filename, "/"); |
1385 |
|
strcat(filename, finfo->name); |
1386 |
|
|
1387 |
|
gpx_t *new_gpx = decompress_zip(dialog, filename, username); |
1388 |
|
if(new_gpx) { |
1389 |
|
if(!gpx) gpx = new_gpx; |
1390 |
|
else { |
1391 |
|
/* append all caches from "new_gpx" to gpx */ |
1392 |
|
|
1393 |
|
cache_t **cache = &(gpx->cache); |
1394 |
|
while(*cache) cache = &(*cache)->next; |
1395 |
|
|
1396 |
|
*cache = new_gpx->cache; |
1397 |
|
new_gpx->cache = NULL; |
1398 |
|
gpx_free(new_gpx); |
1399 |
|
} |
1400 |
|
} |
1401 |
|
|
1402 |
|
free(filename); |
1403 |
} |
} |
1404 |
} |
} |
1405 |
} |
} |