diff options
author | Holger Zickner <[email protected]> | 2004-07-23 22:38:52 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2004-07-23 22:38:52 +0000 |
commit | fb25025a51a56f3d5bfaeb10d59634d870f8449c (patch) | |
tree | faac8013e9ca907e8387c0e14031bd54483f2800 /src/jake2 | |
parent | a161d9817f1a86aedffb8789e2134c6a29e5fa35 (diff) |
fix download bug
Diffstat (limited to 'src/jake2')
-rw-r--r-- | src/jake2/client/CL_parse.java | 6 | ||||
-rw-r--r-- | src/jake2/qcommon/Com.java | 16 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/jake2/client/CL_parse.java b/src/jake2/client/CL_parse.java index f50857d..130e89f 100644 --- a/src/jake2/client/CL_parse.java +++ b/src/jake2/client/CL_parse.java @@ -2,7 +2,7 @@ * CL_parse.java * Copyright (C) 2004 * - * $Id: CL_parse.java,v 1.6 2004-07-12 20:47:01 hzi Exp $ + * $Id: CL_parse.java,v 1.7 2004-07-23 22:38:51 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -103,7 +103,7 @@ public class CL_parse extends CL_view { // download to a temp name, and only rename // to the real name when done, so if interrupted // a runt file wont be left - Com.StripExtension(cls.downloadname, cls.downloadtempname); + cls.downloadtempname = Com.StripExtension(cls.downloadname); cls.downloadtempname += ".tmp"; // ZOID @@ -175,7 +175,7 @@ public class CL_parse extends CL_view { // download to a temp name, and only rename // to the real name when done, so if interrupted // a runt file wont be left - Com.StripExtension(cls.downloadname, cls.downloadtempname); + cls.downloadtempname = Com.StripExtension(cls.downloadname); cls.downloadtempname += ".tmp"; MSG.WriteByte(cls.netchan.message, clc_stringcmd); diff --git a/src/jake2/qcommon/Com.java b/src/jake2/qcommon/Com.java index 705a009..16c592f 100644 --- a/src/jake2/qcommon/Com.java +++ b/src/jake2/qcommon/Com.java @@ -2,7 +2,7 @@ * Com.java * Copyright (C) 2003 * - * $Id: Com.java,v 1.3 2004-07-09 06:50:50 hzi Exp $ + * $Id: Com.java,v 1.4 2004-07-23 22:38:52 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -350,11 +350,6 @@ public final class Com DPrintf(fmt, null); } - public static void d(String fmt) - { - DPrintf(fmt + "\n", null); - } - public static void Printf(String fmt) { Printf(fmt, null); @@ -515,15 +510,16 @@ public final class Com return MD4.Com_BlockChecksum(buf, length); } - public static void StripExtension(String string, String string2) - { - // TODO implement StripExtension + public static String StripExtension(String string) { + int i = string.lastIndexOf('.'); + if (i < 0) + return string; + return string.substring(0, i); } /** * CRC table. */ - static int chktbl[]= { 0x84, |