From b01275d8c5eec2b4a868d681f2b89649f50d2325 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Thu, 5 Oct 2006 20:27:09 +0000 Subject: Path fixup in the zipreader (necessary with my adapter/zip/build combination?) svn-id: r24128 --- backends/platform/ds/arm9/source/zipreader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp index c74cb87c78..92dd170c2a 100644 --- a/backends/platform/ds/arm9/source/zipreader.cpp +++ b/backends/platform/ds/arm9/source/zipreader.cpp @@ -215,6 +215,9 @@ void ZipFile::changeToRoot() { void ZipFile::changeDirectory(char* dir) { // consolePrintf("Current dir now '%s'\n", dir); strcpy(_directory, dir); + size_t l = strlen(_directory); + if (l && (_directory[l-1] == '/' )) + _directory[l-1] = '\0'; } ZipFile::~ZipFile() { -- cgit v1.2.3