[Scummvm-cvs-logs] SF.net SVN: scummvm:[46453] tools/branches/gsoc2009-gui/compress_gob.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Mon Dec 21 00:26:58 CET 2009


Revision: 46453
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46453&view=rev
Author:   strangerke
Date:     2009-12-20 23:26:58 +0000 (Sun, 20 Dec 2009)

Log Message:
-----------
Modify help text, fix output filename when -o parameter is specified

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/compress_gob.cpp

Modified: tools/branches/gsoc2009-gui/compress_gob.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.cpp	2009-12-20 23:02:50 UTC (rev 46452)
+++ tools/branches/gsoc2009-gui/compress_gob.cpp	2009-12-20 23:26:58 UTC (rev 46453)
@@ -47,10 +47,10 @@
 
 	_shorthelp = "Compresses Gobliiins! data files.";
 	_helptext = 
-		"\nUsage: " + getName() + " [-o <output> = out.stk] [-f] <conf file>\n"
+		"\nUsage: " + getName() + " [-o <output path>] [-f] <conf file>\n"
 		"<conf file> is a .gob file generated extract_gob_stk\n"
-		"<-f> ignores the compression flag in the .gob file and force compression for all files\n\n"
-		"The stick archive (STK/ITK/LTK) will be created in the current directory.\n";
+		"<-f> forces compression for all files\n\n"
+		"The stick archive (STK/ITK/LTK) will be created in the directory specified by the '-o' parameter.\n";
 }
 
 CompressGob::~CompressGob() {
@@ -72,22 +72,18 @@
 
 	Common::Filename inpath(_inputPaths[0].path);
 
-// We output with .stk extension, if there is no specific out file
+	// We output with .stk extension, if there is no specific out file
 	if (_outputPath.empty()) {
 		_outputPath = inpath;
-		_outputPath.setExtension(".stk");
 	}
-	if (_outputPath.directory()) {
-		_outputPath.setFullName(inpath.getName());
-		_outputPath.setExtension(".stk");
-	}
-
 	// Open input (config) file
 	gobConf.open(inpath, "r");
 	// Read the input into memory
 	_chunks = readChunkConf(gobConf, inpath, chunkCount);
 	gobConf.close();
 
+	_outputPath.setFullName(inpath.getFullName());
+	
 	stk.open(_outputPath, "wb");
 
 	// Output in compressed format


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list