From 498ccacd689730e943dec521bb33f8b7963e1c77 Mon Sep 17 00:00:00 2001 From: marian Date: Thu, 31 Mar 2011 12:41:11 +0000 Subject: [PATCH] Fixed account directory clear: don't add path separator when listing the directory. Fixed account directory setup: properly check the error when listing the parent directory. git-svn-id: http://voip.null.ro/svn/yate@4250 acf43c95-373e-0410-b603-e72c3f656dc1 --- engine/Client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/Client.cpp b/engine/Client.cpp index 3192a15e..59d4df46 100644 --- a/engine/Client.cpp +++ b/engine/Client.cpp @@ -4075,7 +4075,7 @@ bool ClientAccount::setupDataDir(String* errStr, bool saveAcc) int error = 0; ObjList dirs; ObjList files; - File::listDirectory(path,&dirs,&files); + File::listDirectory(path,&dirs,&files,&error); if (error) return showAccError(this,errStr,"Failed to list directory",path,error); String fullPath = path + Engine::pathSeparator() + dir; @@ -4186,13 +4186,13 @@ bool ClientAccount::clearDataDir(String* errStr) if (!dirs.find(dir)) return true; // Delete files - tmp << Engine::pathSeparator() << dir << Engine::pathSeparator(); + tmp << Engine::pathSeparator() << dir; int error = 0; bool ok = false; ObjList files; if (File::listDirectory(tmp,0,&files,&error)) { for (ObjList* o = files.skipNull(); o; o = o->skipNext()) { - String file(tmp + o->get()->toString()); + String file(tmp + Engine::pathSeparator() + o->get()->toString()); int err = 0; if (!File::remove(file,&err)) { if (!error)