Skip to content
Snippets Groups Projects
Commit 50752fb1 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Actually support the second (filename) argument, when specified

parent 8be9b414
No related branches found
No related tags found
1 merge request!488Overhaul LZH code
...@@ -6,6 +6,7 @@ if(argv.indexOf("-help") >= 0 || argv.indexOf("-?") >= 0) { ...@@ -6,6 +6,7 @@ if(argv.indexOf("-help") >= 0 || argv.indexOf("-?") >= 0) {
} }
var code = argv[0]; var code = argv[0];
var filename = argv[1];
while(!file_area.dir[code] && !js.terminated) { while(!file_area.dir[code] && !js.terminated) {
for(var d in file_area.dir) for(var d in file_area.dir)
...@@ -24,6 +25,8 @@ if(!filebase.open()) { ...@@ -24,6 +25,8 @@ if(!filebase.open()) {
var file_list = filebase.get_list(); var file_list = filebase.get_list();
for(var i = 0; i < file_list.length; i++) { for(var i = 0; i < file_list.length; i++) {
var file = file_list[i]; var file = file_list[i];
if(filename && !wildmatch(file.name, filename))
continue;
print(JSON.stringify(file, null, 4)); print(JSON.stringify(file, null, 4));
var hash = filebase.hash(file.name); var hash = filebase.hash(file.name);
if(hash == null) { if(hash == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment