nfqws2,zapret-lib: fix wrong spelling : WRITEABLE -> WRITABLE

This commit is contained in:
bol-van
2026-06-07 08:34:40 +03:00
parent 441d2e3cfc
commit fe8b8df2ae
10 changed files with 42 additions and 41 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
NFQWS2_COMPAT_VER_REQUIRED=5
NFQWS2_COMPAT_VER_REQUIRED=6
if NFQWS2_COMPAT_VER~=NFQWS2_COMPAT_VER_REQUIRED then
error("Incompatible NFQWS2_COMPAT_VER. Use pktws and lua scripts from the same release !")
@@ -1435,9 +1435,9 @@ end
function append_path(path,file)
return string.sub(path,#path,#path)=='/' and path..file or path.."/"..file
end
function writeable_file_name(filename)
function writable_file_name(filename)
if is_absolute_path(filename) then return filename end
local writedir = os.getenv("WRITEABLE")
local writedir = os.getenv("WRITABLE")
if not writedir then return filename end
return append_path(writedir, filename)
end
+3 -3
View File
@@ -15,8 +15,8 @@ function pcap_write(file, raw)
pcap_write_packet(file, raw)
end
-- test case : --writeable=zdir --in-range=a --lua-desync=pcap:file=test.pcap
-- arg : file=<filename> - file for storing pcap data. if --writeable is specified and filename is relative - append filename to writeable path
-- test case : --writable=zdir --in-range=a --lua-desync=pcap:file=test.pcap
-- arg : file=<filename> - file for storing pcap data. if --writable is specified and filename is relative - append filename to writable path
-- arg : keep - do not overwrite file, append packets to existing
function pcap(ctx, desync)
if not desync.arg.file or #desync.arg.file==0 then
@@ -24,7 +24,7 @@ function pcap(ctx, desync)
end
local fn_cache_name = desync.func_instance.."_fn"
if not _G[fn_cache_name] then
_G[fn_cache_name] = writeable_file_name(desync.arg.file)
_G[fn_cache_name] = writable_file_name(desync.arg.file)
if not desync.arg.keep then
-- overwrite file
os.remove(_G[fn_cache_name])