mirror of
https://github.com/bol-van/zapret2.git
synced 2026-06-17 12:50:04 +04:00
nfqws2,zapret-lib: fix wrong spelling : WRITEABLE -> WRITABLE
This commit is contained in:
+3
-3
@@ -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
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user