Use length for comparision
parent
e903044fd5
commit
7596d211e9
|
@ -239,7 +239,7 @@ class ClientCore < Extension
|
|||
if client.platform =~ /linux/i
|
||||
socket_path = File.join(writable_dir, Rex::Text.rand_text_alpha_lower(5 + rand(5)))
|
||||
|
||||
if socket_path > UNIX_PATH_MAX - 1
|
||||
if socket_path.length > UNIX_PATH_MAX - 1
|
||||
raise RuntimeError, "The writable dir is too long", caller
|
||||
end
|
||||
|
||||
|
|
|
@ -351,7 +351,7 @@ class Console::CommandDispatcher::Core
|
|||
end
|
||||
|
||||
if client.platform =~ /linux/
|
||||
writable_dir = (args.length >= 2) ? args[1] : "/tmp/"
|
||||
writable_dir = (args.length >= 2) ? args[1] : "/tmp/"
|
||||
end
|
||||
|
||||
begin
|
||||
|
@ -395,9 +395,9 @@ class Console::CommandDispatcher::Core
|
|||
|
||||
# Do this thang.
|
||||
if client.platform =~ /linux/
|
||||
client.core.migrate(pid)
|
||||
else
|
||||
client.core.migrate(pid, writable_dir)
|
||||
else
|
||||
client.core.migrate(pid)
|
||||
end
|
||||
|
||||
print_status("Migration completed successfully.")
|
||||
|
|
Loading…
Reference in New Issue