Changeset d74c90b in tol
- Timestamp:
- May 28, 2010, 11:44:33 AM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- bcf71ac
- Parents:
- 3bb2203
- File:
-
- 1 edited
-
tol/OIS/oisstream_zip.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/OIS/oisstream_zip.cpp
r3bb2203 rd74c90b 186 186 header->SetTime(time); 187 187 sh_.zip_.FlushBuffers(); 188 sh_.zip_.OverwriteLocalHeader(index_); 189 sh_.zip_.RemoveCentralDirectoryFromArchive(); 190 sh_.zip_.CommitChanges(); 188 191 } 189 192 catch(CZipException ex) … … 213 216 return(size); 214 217 } 215 216 218 217 219 //-------------------------------------------------------------------- … … 231 233 //assert(index_>=0); 232 234 } 235 sh_.zip_.CommitChanges(); 233 236 sh_.zip_.FlushBuffers(); 234 237 } … … 422 425 openMode_ = openMode; 423 426 BText action = I2("'INVALID ACTION'", "'ACCIN INVLIDA'"); 427 if(write) 428 { 429 BDir path = connection; 430 if(path.Exist()) 431 { 432 if(path.IsDir()) 433 { 434 BText msg = I2("Cannot ","No se puede ")+action+" ZIP "+ 435 connection_+" due it is an existant directory"; 436 if(errorWarning) { Error(msg); } 437 else { Warning(msg); } 438 return(false); 439 } 440 else 441 { 442 remove(connection); 443 } 444 } 445 } 424 446 try 425 447 { … … 498 520 try 499 521 { 522 if(openMode_==BSHOM_WRITE) 523 { 524 BArray<BText> arr; 525 arr.AllocBuffer(1); 526 arr[0] = name; 527 RemoveFiles(arr); 528 } 500 529 fs = new BZipStream(*this); 501 530 if(!fs->Open(title,name,openMode_,index)) … … 548 577 //Std(BText("TRACE BZipStreamHandler::RemoveFiles() 3.")+n+".1\n"); 549 578 files_.Add(str); 579 k++; 550 580 //Std(BText("TRACE BZipStreamHandler::RemoveFiles() 3.")+n+".1\n"); 551 581 }
Note: See TracChangeset
for help on using the changeset viewer.
