--- a/php.nette2/src/org/netbeans/modules/php/nette2/Nette2FrameworkProvider.java +++ a/php.nette2/src/org/netbeans/modules/php/nette2/Nette2FrameworkProvider.java @@ -42,11 +42,14 @@ package org.netbeans.modules.php.nette2; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; import org.netbeans.modules.php.api.framework.BadgeIcon; import org.netbeans.modules.php.api.phpmodule.PhpModule; import org.netbeans.modules.php.api.phpmodule.PhpModuleProperties; @@ -97,9 +100,9 @@ if (!result) { FileObject sourceDirectory = phpModule.getSourceDirectory(); if (sourceDirectory != null) { - FileObject bootstrap = sourceDirectory.getFileObject(Constants.COMMON_BOOTSTRAP_PATH); + FileObject bootstrap = getFileObject(sourceDirectory, Constants.COMMON_BOOTSTRAP_PATH); result = bootstrap != null && !bootstrap.isFolder() && bootstrap.isValid(); - FileObject config = sourceDirectory.getFileObject(Constants.COMMON_CONFIG_PATH); + FileObject config = getFileObject(sourceDirectory, Constants.COMMON_CONFIG_PATH); result = result && config != null && config.isFolder() && config.isValid(); } } @@ -181,4 +184,26 @@ return new Nette2CustomizerExtender(phpModule); } + /** + * Try to get a FileObject with correct filename case. See bug 238679. + * + * @param parent Parent FileObject. + * @param relPath Relative path, separated by slashes. + */ + private FileObject getFileObject(FileObject parent, String relPath) { + File parentFile = FileUtil.toFile(parent); + if (parentFile != null) { + String nativePath = relPath.replace('/', File.separatorChar); + try { + File retFile = new File(parentFile, nativePath).getCanonicalFile(); + return FileUtil.toFileObject(retFile); + } catch (IOException ex) { + Logger.getLogger(Nette2FrameworkProvider.class.getName()).log( + Level.FINE, null, ex); + return null; + } + } else { + return null; + } + } } --- a/php.symfony2/src/org/netbeans/modules/php/symfony2/commands/Symfony2Script.java +++ a/php.symfony2/src/org/netbeans/modules/php/symfony2/commands/Symfony2Script.java @@ -68,6 +68,7 @@ import org.openide.NotifyDescriptor; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; +import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.util.NbBundle.Messages; import org.openide.windows.InputOutput; @@ -117,7 +118,18 @@ // perhaps deleted app dir? fallback to default and let it fail later... return null; } - return appDir.getFileObject(SCRIPT_NAME); + File appDirFile = FileUtil.toFile(appDir); // #238679 + if (appDirFile != null) { + try { + File retFile = new File(appDirFile, SCRIPT_NAME).getCanonicalFile(); + return FileUtil.toFileObject(retFile); + } catch (IOException ex) { + LOGGER.log(Level.FINE, null, ex); + return null; + } + } else { + return null; + } } /**