https://gitlab.synchro.net/main/sbbs/-/issues/669#note_4864
Hi @nelgin, I made this ugly patch on exec/load/tickit/file_handler.js to fallback copy file if archive format was not detected. Maybe @rswindell can help us to cleanup and write better code.
It working for my for Hobbynet that delivery HOBBYNET.ZIP (for echolist) and HOBBYNET.??? (unpacket file for nodelist)
my tickt.ini config for hobbynet:
```
[HNET_NODE]
Dir=hnet_node
SourceAddress=954:895/37@hobbynet
AKAMatching=true
ForceReplace=true
Handler=tickit/file_handler.js
HandlerArg = { "match": "HOBBYNET*", "files": [{ "source": "HOBBYNET.*", "destination": "/sbbs/fido/NODELIST.HOBBYNET" }]}
[HNET_INFO]
Dir=hnet_info
SourceAddress=954:895/37@hobbynet
AKAMatching=true
ForceReplace=true
Handler = tickit/file_handler.js
HandlerArg = { "match": "HOBBYNET.ZIP", "files": [{ "source": "HOBBYNET.NA", "destination": "/sbbs/fido/ECHOLIST.HOBBYNET" }]}
```
```diff
--- file_handler.js.orig 2020-08-26 18:19:00.000000000 -0300
+++ file_handler.js 2024-02-18 00:56:33.272600403 -0300
@@ -107,8 +107,7 @@ function Handle_TIC(tic, ctx, arg) {
f.close();
if (unpack == undefined) {
- log(LOG_ERROR, 'Unable to identify packer for ' + tic.file);
- return false;
+ log(LOG_INFO, 'Unable to identify packer for ' + tic.file);
}
// Create a directory to extract to...
@@ -129,10 +128,28 @@ function Handle_TIC(tic, ctx, arg) {
}
}
- if (!run_and_log(unpack, tic.full_path, dir)) return false;
+ if (unpack == undefined) {
+ log(LOG_DEBUG, "No packer, direct copy file");
+ var sf = tic.full_path;
+ var df = backslash(dir) + tic.file;
+ if (!file_copy(sf , df)) {
+ log(LOG_ERROR, 'Failed to copy no packed file: ' + sf + ' to ' + df);
+ return;
+ }
+ }
+ else {
+ if (!run_and_log(unpack, tic.full_path, dir)) return false;
+ }
cfg.files.forEach(function (e) {
- var sf = backslash(dir) + e.source;
+ var sf;
+