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