From 6863cf45e9d063d0083a9c9491ac3d74fe682240 Mon Sep 17 00:00:00 2001 From: Natsu Tadama Date: Tue, 10 Dec 2024 01:29:58 +0700 Subject: [PATCH] Fix 'a' particle may renamed accidentally by path picker --- modules/filepath_posix.groovy | 4 ++-- modules/filepath_windows.groovy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/filepath_posix.groovy b/modules/filepath_posix.groovy index 182fd42..791a5eb 100644 --- a/modules/filepath_posix.groovy +++ b/modules/filepath_posix.groovy @@ -13,8 +13,8 @@ "$mntp/Music", "$mntp/Videos", "$mntp/Games", - "$mntp/Books" - ].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last() + "$mntp/Books", + ].collect { it as File }.sort { first, second -> first.exists() <=> second.exists() ?: first.diskSpace <=> second.diskSpace }.last() def final_ = override ? override : guess "$final_/" } diff --git a/modules/filepath_windows.groovy b/modules/filepath_windows.groovy index 2ca6482..c4ea585 100644 --- a/modules/filepath_windows.groovy +++ b/modules/filepath_windows.groovy @@ -8,8 +8,8 @@ "E:/", "F:/", "G:/", - "H:/" - ].collect { it as File }.sort { a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last() + "H:/", + ].collect { it as File }.sort { first, second -> first.exists() <=> second.exists() ?: first.diskSpace <=> second.diskSpace }.last() def final_ = override ? override : guess "$final_/" }