files.sort make no difference for files itself
Signed-off-by: Lu Kaiyi 2392863668@qq.com --- container/assign-account/get_account_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/assign-account/get_account_info.rb b/container/assign-account/get_account_info.rb index 9a7acda..0ce8cad 100755 --- a/container/assign-account/get_account_info.rb +++ b/container/assign-account/get_account_info.rb @@ -76,7 +76,7 @@ class AccountStorage end
def build_account_name(available_dir, files) - files.sort + files.sort! account_info = [] account_info.push files[0] source_file = File.join(available_dir, files[0])
On Wed, Dec 16, 2020 at 09:53:05AM +0800, Lu Kaiyi wrote:
files.sort make no difference for files itself
Signed-off-by: Lu Kaiyi 2392863668@qq.com
container/assign-account/get_account_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/assign-account/get_account_info.rb b/container/assign-account/get_account_info.rb index 9a7acda..0ce8cad 100755 --- a/container/assign-account/get_account_info.rb +++ b/container/assign-account/get_account_info.rb @@ -76,7 +76,7 @@ class AccountStorage end
def build_account_name(available_dir, files)
- files.sort
- files.sort! account_info = [] account_info.push files[0]
try this:
Array(files.sort!).first
Thanks, Liushaofei
source_file = File.join(available_dir, files[0])
-- 2.23.0