From b06e7564fa24b1652eb3fc7b349a4c911e078561 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Mon, 21 Jun 2010 04:17:17 +0000 Subject: [PATCH] removezip name fix git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5208 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/zip.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/src/zip.cpp b/source/src/zip.cpp index 9e3086fe..1e7ded46 100644 --- a/source/src/zip.cpp +++ b/source/src/zip.cpp @@ -301,7 +301,11 @@ bool addzip(const char *name, const char *mount = NULL, const char *strip = NULL bool removezip(const char *name) { - const char *pname = path(name, true); + string pname; + copystring(pname, name); + path(pname); + int plen = (int)strlen(pname); + if(plen < 4 || !strchr(&pname[plen-4], '.')) concatstring(pname, ".zip"); ziparchive *exists = findzip(pname); if(!exists) {