Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Commit ada6b42

Browse files
committed
fix: remove unnecessary log statements and improve download URL handling in gmod13_open
1 parent 0893506 commit ada6b42

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

crates/real/src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ fn gmod13_open(_lua: State) -> i32 {
140140
print_log("Checking dependencies...");
141141

142142
// Download GWsockets
143-
print_log("Checking GWsockets...");
144143
match download_dependency(&client, GWSOCKETS_API, "gwsockets", version_cache.gwsockets.as_ref()) {
145144
Ok(Some(new_version)) => {
146145
version_cache.gwsockets = Some(new_version);
@@ -151,7 +150,6 @@ fn gmod13_open(_lua: State) -> i32 {
151150
}
152151

153152
// Download reqwest
154-
print_log("Checking reqwest...");
155153
match download_dependency(&client, REQWEST_API, "reqwest", version_cache.reqwest.as_ref()) {
156154
Ok(Some(new_version)) => {
157155
version_cache.reqwest = Some(new_version);
@@ -199,7 +197,6 @@ fn gmod13_open(_lua: State) -> i32 {
199197

200198
// Construct the direct GitHub archive URL instead of using the API's zipball_url
201199
let download_url = format!("https://github.com/gmod-integration/gmod-integration/archive/refs/tags/{}.zip", release.tag_name);
202-
print_log(&format!("Using direct download URL: {}", download_url));
203200

204201
let response = match client
205202
.get(&download_url)
@@ -216,7 +213,6 @@ fn gmod13_open(_lua: State) -> i32 {
216213
// Check if response is successful
217214
if !response.status().is_success() {
218215
print_log(&format!("Download failed with status: {}", response.status()));
219-
print_log(&format!("Final URL: {}", response.url()));
220216
return 1;
221217
}
222218

@@ -239,12 +235,9 @@ fn gmod13_open(_lua: State) -> i32 {
239235
return 1;
240236
}
241237

242-
print_log(&format!("Downloaded {} bytes", bytes.len()));
243-
244238
// Check if it's actually a ZIP file by looking at the first few bytes
245239
if bytes.len() < 4 || &bytes[0..4] != b"PK\x03\x04" {
246240
print_log("Downloaded file is not a valid ZIP file");
247-
print_log(&format!("First 50 bytes: {:?}", &bytes[0..bytes.len().min(50)]));
248241
return 1;
249242
}
250243

@@ -269,7 +262,6 @@ fn gmod13_open(_lua: State) -> i32 {
269262
Ok(a) => a,
270263
Err(e) => {
271264
print_log(&format!("Failed to read zip archive: {:?}", e));
272-
print_log("This might be due to incomplete download or invalid zip file");
273265
// Clean up the invalid zip file
274266
let _ = fs::remove_file(&zip_path);
275267
return 1;

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25
1+
28

0 commit comments

Comments
 (0)