summaryrefslogtreecommitdiff
path: root/rbutil/rbutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutil.cpp')
-rw-r--r--rbutil/rbutil.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/rbutil/rbutil.cpp b/rbutil/rbutil.cpp
index 0f58c09707..058ca10a27 100644
--- a/rbutil/rbutil.cpp
+++ b/rbutil/rbutil.cpp
@@ -101,6 +101,7 @@ bool InstallTheme(wxString Themesrc)
101 101
102bool checkZip(wxString zipname) 102bool checkZip(wxString zipname)
103{ 103{
104
104 wxZipEntryPtr entry; 105 wxZipEntryPtr entry;
105 106
106 wxFFileInputStream* in_file = new wxFFileInputStream(zipname); 107 wxFFileInputStream* in_file = new wxFFileInputStream(zipname);
@@ -124,6 +125,7 @@ bool checkZip(wxString zipname)
124 } 125 }
125 126
126 return false; 127 return false;
128
127} 129}
128 130
129int DownloadURL(wxString src, wxString dest) 131int DownloadURL(wxString src, wxString dest)
@@ -267,6 +269,7 @@ int DownloadURL(wxString src, wxString dest)
267 269
268int UnzipFile(wxString src, wxString destdir, bool isInstall) 270int UnzipFile(wxString src, wxString destdir, bool isInstall)
269{ 271{
272
270 wxZipEntryPtr entry; 273 wxZipEntryPtr entry;
271 wxString in_str, progress_msg, buf,subdir; 274 wxString in_str, progress_msg, buf,subdir;
272 int errnum = 0, curfile = 0, totalfiles = 0; 275 int errnum = 0, curfile = 0, totalfiles = 0;
@@ -328,8 +331,10 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
328 (entry.reset(in_zip->GetNextEntry()), entry.get() != NULL) ) 331 (entry.reset(in_zip->GetNextEntry()), entry.get() != NULL) )
329 { 332 {
330 333
334
331 curfile++; 335 curfile++;
332 wxString name = entry->GetName(); 336 wxString name = entry->GetName();
337 // set progress
333 progress_msg = wxT("Unpacking ") + name; 338 progress_msg = wxT("Unpacking ") + name;
334 if (! progress->Update(curfile, progress_msg) ) 339 if (! progress->Update(curfile, progress_msg) )
335 { 340 {
@@ -367,6 +372,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
367 continue; // this is just a directory, nothing else to do 372 continue; // this is just a directory, nothing else to do
368 } 373 }
369 374
375 // its a file, copy it
370 wxFFileOutputStream* out = new wxFFileOutputStream(in_str); 376 wxFFileOutputStream* out = new wxFFileOutputStream(in_str);
371 if (! out->IsOk() ) 377 if (! out->IsOk() )
372 { 378 {
@@ -412,6 +418,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
412 if (log) delete log; 418 if (log) delete log;
413 wxLogVerbose(wxT("=== end UnzipFile")); 419 wxLogVerbose(wxT("=== end UnzipFile"));
414 return(errnum); 420 return(errnum);
421
415} 422}
416 423
417int Uninstall(const wxString dir, bool isFullUninstall) { 424int Uninstall(const wxString dir, bool isFullUninstall) {