feat(gyroflow): add package and module
This commit is contained in:
parent
37275b4422
commit
c16835d755
4 changed files with 310 additions and 0 deletions
27
home/gyroflow/package/crash-dump.patch
Normal file
27
home/gyroflow/package/crash-dump.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff --git a/src/util.rs b/src/util.rs
|
||||
index 1d58ffb8..afee58d4 100644
|
||||
--- a/src/util.rs
|
||||
+++ b/src/util.rs
|
||||
@@ -302,22 +302,6 @@ pub fn install_crash_handler() -> std::io::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
- // Upload crash dumps
|
||||
- crate::core::run_threaded(move || {
|
||||
- if let Ok(files) = std::fs::read_dir(cur_dir) {
|
||||
- for path in files.flatten() {
|
||||
- let path = path.path();
|
||||
- if path.to_string_lossy().ends_with(".dmp") {
|
||||
- if let Ok(content) = std::fs::read(&path) {
|
||||
- if let Ok(Ok(body)) = ureq::post("https://api.gyroflow.xyz/upload_dump").set("Content-Type", "application/octet-stream").send_bytes(&content).map(|x| x.into_string()) {
|
||||
- ::log::debug!("Minidump uploaded: {}", body.as_str());
|
||||
- let _ = std::fs::remove_file(path);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- });
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue