This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 246881
Collapse All | Expand All

(-)a/cnd.utils/src/org/netbeans/modules/cnd/utils/cache/CndFileUtils.java (-8 / +16 lines)
Lines 86-91 Link Here
86
 * @author Vladimir Voskresensky
86
 * @author Vladimir Voskresensky
87
 */
87
 */
88
public final class CndFileUtils {
88
public final class CndFileUtils {
89
    private static final String TRUE_CASE_SENSITIVE_SYSTEM_PROP = "cnd.case.sensitive"; // NOI18N
89
    private static final boolean TRUE_CASE_SENSITIVE_SYSTEM;
90
    private static final boolean TRUE_CASE_SENSITIVE_SYSTEM;
90
    private static final FileChangeListener FSL = new FSListener();
91
    private static final FileChangeListener FSL = new FSListener();
91
    private static final FSProblemListener FSPL = new FSProblemListener();
92
    private static final FSProblemListener FSPL = new FSProblemListener();
Lines 128-141 Link Here
128
129
129
    static {
130
    static {
130
        boolean caseSenstive;
131
        boolean caseSenstive;
131
        try {
132
        String strVal = System.getProperty(TRUE_CASE_SENSITIVE_SYSTEM_PROP);
132
            File tmpFile = File.createTempFile("CaseSensitiveFile", ".check"); // NOI18N
133
        if (strVal == null) {
133
            String absPath = tmpFile.getAbsolutePath();
134
            // calculate
134
            absPath = absPath.toUpperCase();
135
            try {
135
            caseSenstive = !new File(absPath).exists();
136
                File tmpFile = File.createTempFile("CaseSensitiveFile", ".check"); // NOI18N
136
            tmpFile.delete();
137
                String absPath = tmpFile.getAbsolutePath();
137
        } catch (IOException ex) {
138
                absPath = absPath.toUpperCase();
138
            caseSenstive = Utilities.isUnix() && !Utilities.isMac();
139
                caseSenstive = !new File(absPath).exists();
140
                tmpFile.delete();
141
            } catch (IOException ex) {
142
                caseSenstive = Utilities.isUnix() && !Utilities.isMac();
143
            }
144
        } else {
145
            // rely on user's choice
146
            caseSenstive = Boolean.parseBoolean(strVal);
139
        }
147
        }
140
        TRUE_CASE_SENSITIVE_SYSTEM = caseSenstive;
148
        TRUE_CASE_SENSITIVE_SYSTEM = caseSenstive;
141
        CndFileSystemProvider.addFileChangeListener(FSL);
149
        CndFileSystemProvider.addFileChangeListener(FSL);

Return to bug 246881