1 | /* |
1 | /* |
2 | * static char *rcsid_map_c = |
2 | * static char *rcsid_map_c = |
3 | * "$Id: map.c,v 1.11 2006/05/12 23:42:59 root Exp $"; |
3 | * "$Id: map.c,v 1.12 2006/05/17 18:32:50 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
1248 | strcpy(filename, m->tmpname); |
1248 | strcpy(filename, m->tmpname); |
1249 | } |
1249 | } |
1250 | LOG(llevDebug,"Saving map %s\n",m->path); |
1250 | LOG(llevDebug,"Saving map %s\n",m->path); |
1251 | m->in_memory = MAP_SAVING; |
1251 | m->in_memory = MAP_SAVING; |
1252 | |
1252 | |
|
|
1253 | unlink (filename); // do not overwrite backups if done via hardlinks |
|
|
1254 | |
1253 | /* Compress if it isn't a temporary save. Do compress if unique */ |
1255 | /* Compress if it isn't a temporary save. Do compress if unique */ |
1254 | if (m->compressed && (m->unique || m->template || flag)) { |
1256 | if (m->compressed && (m->unique || m->template || flag)) { |
1255 | char buf[MAX_BUF]; |
1257 | char buf[MAX_BUF]; |
1256 | strcpy(buf, uncomp[m->compressed][2]); |
1258 | strcpy(buf, uncomp[m->compressed][2]); |
1257 | strcat(buf, " > "); |
1259 | strcat(buf, " > "); |