mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-30 16:29:40 +00:00
Detecting Windows and disabling case insensitive file filters as they
aren't supported (or needed!). #35
This commit is contained in:
parent
3187d016af
commit
3b31a9385d
@ -47,6 +47,7 @@ import com.webcodepro.applecommander.ui.swt.util.ImageCanvas;
|
||||
import com.webcodepro.applecommander.ui.swt.util.ImageManager;
|
||||
import com.webcodepro.applecommander.ui.swt.wizard.comparedisks.CompareDisksWizard;
|
||||
import com.webcodepro.applecommander.ui.swt.wizard.diskimage.DiskImageWizard;
|
||||
import com.webcodepro.applecommander.util.Host;
|
||||
import com.webcodepro.applecommander.util.TextBundle;
|
||||
|
||||
/**
|
||||
@ -189,6 +190,10 @@ public class SwtAppleCommander implements Listener {
|
||||
* {@code *.[dD][sS][kK]}.
|
||||
*/
|
||||
protected String makeExtensionCaseInsensitive(String extension) {
|
||||
if (Host.isWindows()) {
|
||||
// Windows SWT does not support the regex and is case insensitive. Leave it as-is!
|
||||
return extension;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (char ch : extension.toCharArray()) {
|
||||
if (Character.isLetter(ch)) {
|
||||
|
@ -81,4 +81,14 @@ public class Host {
|
||||
}
|
||||
return pathName;
|
||||
}
|
||||
|
||||
public static boolean isLinux() {
|
||||
return linux;
|
||||
}
|
||||
public static boolean isMacosx() {
|
||||
return macOSX;
|
||||
}
|
||||
public static boolean isWindows() {
|
||||
return windows;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user