Lines 97-105
Link Here
|
97 |
if (!result) { |
97 |
if (!result) { |
98 |
FileObject sourceDirectory = phpModule.getSourceDirectory(); |
98 |
FileObject sourceDirectory = phpModule.getSourceDirectory(); |
99 |
if (sourceDirectory != null) { |
99 |
if (sourceDirectory != null) { |
100 |
FileObject bootstrap = sourceDirectory.getFileObject(Constants.COMMON_BOOTSTRAP_PATH); |
100 |
FileObject bootstrap = getFileObject(sourceDirectory, Constants.COMMON_BOOTSTRAP_PATH); |
101 |
result = bootstrap != null && !bootstrap.isFolder() && bootstrap.isValid(); |
101 |
result = bootstrap != null && !bootstrap.isFolder() && bootstrap.isValid(); |
102 |
FileObject config = sourceDirectory.getFileObject(Constants.COMMON_CONFIG_PATH); |
102 |
FileObject config = getFileObject(sourceDirectory, Constants.COMMON_CONFIG_PATH); |
103 |
result = result && config != null && config.isFolder() && config.isValid(); |
103 |
result = result && config != null && config.isFolder() && config.isValid(); |
104 |
} |
104 |
} |
105 |
} |
105 |
} |
Lines 181-184
Link Here
|
181 |
return new Nette2CustomizerExtender(phpModule); |
181 |
return new Nette2CustomizerExtender(phpModule); |
182 |
} |
182 |
} |
183 |
|
183 |
|
|
|
184 |
/** |
185 |
* Try to get a FileObject with correct filename case. See bug 238679. |
186 |
* |
187 |
* @param parent Parent FileObject. |
188 |
* @param relPath Relative path, separated by slashes. |
189 |
*/ |
190 |
private FileObject getFileObject(FileObject parent, String relPath) { |
191 |
File parentFile = FileUtil.toFile(parent); |
192 |
if (parentFile != null) { |
193 |
String nativePath = relPath.replace('/', File.separatorChar); |
194 |
File file = new File(parentFile, nativePath); |
195 |
return FileUtil.toFileObject(FileUtil.normalizeFile(file)); |
196 |
} else { |
197 |
return null; |
198 |
} |
199 |
} |
184 |
} |
200 |
} |