am f9e0b264: Move check for hidden files in the proper method.
Merge commit 'f9e0b264422d086066a9d9deb2118617735e8d65' into eclair-mr2 * commit 'f9e0b264422d086066a9d9deb2118617735e8d65': Move check for hidden files in the proper method.
This commit is contained in:
@@ -68,10 +68,6 @@ public class JavaResourceFilter implements IZipEntryFilter {
|
|||||||
* @return true if the file should be packaged as standard java resources.
|
* @return true if the file should be packaged as standard java resources.
|
||||||
*/
|
*/
|
||||||
public static boolean checkFileForPackaging(String fileName) {
|
public static boolean checkFileForPackaging(String fileName) {
|
||||||
if (fileName.charAt(0) == '.') { // ignore hidden files.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] fileSegments = fileName.split("\\.");
|
String[] fileSegments = fileName.split("\\.");
|
||||||
String fileExt = "";
|
String fileExt = "";
|
||||||
if (fileSegments.length > 1) {
|
if (fileSegments.length > 1) {
|
||||||
@@ -87,8 +83,12 @@ public class JavaResourceFilter implements IZipEntryFilter {
|
|||||||
* @param extension the extension of the file (excluding '.')
|
* @param extension the extension of the file (excluding '.')
|
||||||
* @return true if the file should be packaged as standard java resources.
|
* @return true if the file should be packaged as standard java resources.
|
||||||
*/
|
*/
|
||||||
public static boolean checkFileForPackaging(String fileName, String extension) {
|
public static boolean checkFileForPackaging(String fileName, String extension) {
|
||||||
// Note: this method is used by ApkBuilder
|
// Note: this method is used by com.android.ide.eclipse.adt.internal.build.ApkBuilder
|
||||||
|
if (fileName.charAt(0) == '.') { // ignore hidden files.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return "aidl".equalsIgnoreCase(extension) == false && // Aidl files
|
return "aidl".equalsIgnoreCase(extension) == false && // Aidl files
|
||||||
"java".equalsIgnoreCase(extension) == false && // Java files
|
"java".equalsIgnoreCase(extension) == false && // Java files
|
||||||
"class".equalsIgnoreCase(extension) == false && // Java class files
|
"class".equalsIgnoreCase(extension) == false && // Java class files
|
||||||
|
|||||||
Reference in New Issue
Block a user