Subversion Repositories spk

Rev

Rev 211 | Rev 227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 211 Rev 213
Line 706... Line 706...
706
bool C_File::CompressFile ( CProgressInfo *progress )
706
bool C_File::CompressFile ( CProgressInfo *progress )
707
{
707
{
708
	Utils::WString file = this->filePointer();
708
	Utils::WString file = this->filePointer();
709
	if ( !CFileIO(file).exists() )
709
	if ( !CFileIO(file).exists() )
710
	{
710
	{
711
		if ( !this->writeToFile("tempuncompr.dat", m_sData, m_lDataSize) )
711
		if ( !this->writeToFile(L"tempuncompr.dat", m_sData, m_lDataSize) )
712
			return false;
712
			return false;
713
		file = "tempuncompr.dat";
713
		file = L"tempuncompr.dat";
714
	}
714
	}
715
 
715
 
716
	bool ret = false;
716
	bool ret = false;
717
 
717
 
718
#pragma warning(disable:4244)
718
#pragma warning(disable:4244)
Line 1520... Line 1520...
1520
	}
1520
	}
1521
 
1521
 
1522
	return false;
1522
	return false;
1523
}
1523
}
1524
 
1524
 
1525
unsigned char *UnPCKFile ( const char *file, size_t *len, bool nocrypt )
1525
unsigned char *UnPCKFile (const Utils::WString &file, size_t *len, bool nocrypt )
1526
{
1526
{
1527
	CFileIO File(file);
1527
	CFileIO File(file);
1528
	if ( !File.startRead() ) return NULL;
1528
	if ( !File.startRead() ) return NULL;
1529
 
1529
 
1530
	size_t size;
1530
	size_t size;
Line 1852... Line 1852...
1852
		}
1852
		}
1853
	}
1853
	}
1854
 
1854
 
1855
	fromFile = fromFile.findReplace(L"/", L"\\");
1855
	fromFile = fromFile.findReplace(L"/", L"\\");
1856
	Utils::WString toFile = CPackages::tempDirectory() + L"bod.tmp";
1856
	Utils::WString toFile = CPackages::tempDirectory() + L"bod.tmp";
1857
	toFile = toFile.findReplace("/", "\\");
1857
	toFile = toFile.findReplace(L"/", L"\\");
1858
 
1858
 
1859
	if ( CFileIO::Exists(fromFile) ) {
1859
	if ( CFileIO::Exists(fromFile) ) {
1860
		if ( X2BC_BOB2BOD(fromFile.toString().c_str(), toFile.toString().c_str())) {
1860
		if ( X2BC_BOB2BOD(fromFile.toString().c_str(), toFile.toString().c_str())) {
1861
			CFileIO F(toFile);
1861
			CFileIO F(toFile);
1862
			if ( F.exists() && F.startRead() ) {
1862
			if ( F.exists() && F.startRead() ) {