Subversion Repositories spk

Rev

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

Rev 185 Rev 196
Line 172... Line 172...
172
 
172
 
173
		if (!file.isin('.'))
173
		if (!file.isin('.'))
174
		{
174
		{
175
			if (file[file.length() - 1] != '/')
175
			if (file[file.length() - 1] != '/')
176
				file += '/';
176
				file += '/';
177
			file += CFileIO(filename).filename();
177
			file += CFileIO(filename).filenameStr();
178
		}
178
		}
179
 
179
 
180
		if (cat.appendFile(filename, file))
180
		if (cat.appendFile(filename, file))
181
			printf("File %s has beed added to: %s::%s\n", filename.c_str(), catfile.c_str(), file.c_str());
181
			printf("File %s has beed added to: %s::%s\n", filename.c_str(), catfile.c_str(), file.c_str());
182
		else
182
		else
Line 215... Line 215...
215
		return;
215
		return;
216
	}
216
	}
217
 
217
 
218
	for(auto itr = list.first(); itr; list.next())
218
	for(auto itr = list.first(); itr; list.next())
219
	{
219
	{
220
		Utils::String filename = CFileIO(file).dir() + "/" + itr->str;
220
		Utils::String filename = CFileIO(file).dir().toString() + "/" + itr->str;
221
 
221
 
222
		C_File f(filename);
222
		C_File f(filename);
223
		if ( !f.CheckValidFilePointer() )
223
		if ( !f.CheckValidFilePointer() )
224
			printf("Error: %s doesn't exists\n", filename.c_str() );
224
			printf("Error: %s doesn't exists\n", filename.c_str() );
225
		else if ( !f.ReadFromFile() )
225
		else if ( !f.ReadFromFile() )
Line 228... Line 228...
228
		{
228
		{
229
			f.UnPCKFile();
229
			f.UnPCKFile();
230
			if ( tofile.empty() )
230
			if ( tofile.empty() )
231
				f.changeFileExt("xml");
231
				f.changeFileExt("xml");
232
			else if ( tofile.left(2) == "*." )
232
			else if ( tofile.left(2) == "*." )
233
				f.changeFileExt(CFileIO(tofile).extension());
233
				f.changeFileExt(CFileIO(tofile).extension().toString());
234
			else
234
			else
235
				f.setFilename(tofile);
235
				f.setFilename(tofile);
236
 
236
 
237
			if ( !f.writeFilePointer() )
237
			if ( !f.writeFilePointer() )
238
				printf("Error: unable to write file: %s\n", tofile.c_str() );
238
				printf("Error: unable to write file: %s\n", tofile.c_str() );
Line 251... Line 251...
251
		return;
251
		return;
252
	}
252
	}
253
 
253
 
254
	for(auto itr = list.first(); itr; itr = list.next())
254
	for(auto itr = list.first(); itr; itr = list.next())
255
	{
255
	{
256
		Utils::String filename = CFileIO(file).dir() + "/" + itr->str;
256
		Utils::String filename = CFileIO(file).dir().toString() + "/" + itr->str;
257
 
257
 
258
		C_File f(filename);
258
		C_File f(filename);
259
		if ( !f.CheckValidFilePointer() )
259
		if ( !f.CheckValidFilePointer() )
260
			printf("Error: %s doesn't exists\n", filename.c_str() );
260
			printf("Error: %s doesn't exists\n", filename.c_str() );
261
		else if ( !f.ReadFromFile() )
261
		else if ( !f.ReadFromFile() )