Subversion Repositories spk

Rev

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

Rev 178 Rev 181
Line 95... Line 95...
95
	if ( filemask == "*" )
95
	if ( filemask == "*" )
96
	{
96
	{
97
		for (unsigned int i = 0; i < cat.GetNumFiles(); i++)
97
		for (unsigned int i = 0; i < cat.GetNumFiles(); i++)
98
		{
98
		{
99
			SInCatFile *f = cat.GetFile(i);
99
			SInCatFile *f = cat.GetFile(i);
100
			if ( !cat.ExtractFile ( f, to ) )
100
			if (!cat.extractFile(f, to.ToString()))
101
				printf ( "Error: %s\n", cat.getErrorString().c_str() );
101
				printf ( "Error: %s\n", cat.getErrorString().c_str() );
102
			else
102
			else
103
				printf ( "File has been written (%s)\n", cat.errorString().c_str() );
103
				printf ( "File has been written (%s)\n", cat.errorString().c_str() );
104
		}
104
		}
105
 
105
 
Line 117... Line 117...
117
		return;
117
		return;
118
	}
118
	}
119
 
119
 
120
	for ( SStringList *fl = fileList->Head(); fl; fl = fl->next )
120
	for ( SStringList *fl = fileList->Head(); fl; fl = fl->next )
121
	{
121
	{
122
		CyString file = fl->str;
122
		Utils::String file = fl->str.ToString();
123
		if ( !cat.ExtractFile ( file, to, preserve ) )
123
		if (!cat.extractFile(file, to.ToString(), preserve))
124
			printf ( "Error: %s\n", cat.getErrorString().c_str() );
124
			printf ( "Error: %s\n", cat.getErrorString().c_str() );
125
		else
125
		else
126
			printf ( "File has been written (%s)\n", cat.errorString().c_str() );
126
			printf ( "File has been written (%s)\n", cat.errorString().c_str() );
127
	}
127
	}
128
 
128
 
Line 175... Line 175...
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).filename();
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
183
			printf("Error: Unable to add file: %s\n", filename.c_str());
183
			printf("Error: Unable to add file: %s\n", filename.c_str());
184
	}
184
	}
185
}
185
}
Line 193... Line 193...
193
	{
193
	{
194
		PrintError ( err );
194
		PrintError ( err );
195
		return;
195
		return;
196
	}
196
	}
197
 
197
 
198
	SInCatFile *f = cat.FindData ( remfile );
198
	SInCatFile *f = cat.findData(remfile.ToString());
199
	if ( !f )
199
	if ( !f )
200
	{
200
	{
201
		printf ( "Unable to find %s in cat file\n", remfile.c_str() );
201
		printf ( "Unable to find %s in cat file\n", remfile.c_str() );
202
		return;
202
		return;
203
	}
203
	}