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 57656
Collapse All | Expand All

(-)src/org/netbeans/spi/project/support/ant/SourcesHelper.java (-8 / +12 lines)
Lines 490-510 Link Here
490
        for (Root r : allRoots) {
490
        for (Root r : allRoots) {
491
            for (FileObject loc : r.getIncludeRoots()) {
491
            for (FileObject loc : r.getIncludeRoots()) {
492
                if (!loc.isFolder()) {
492
                if (!loc.isFolder()) {
493
                    continue;
493
                    if (!FileUtil.isArchiveFile(loc)) {
494
                        continue;
495
                    } 
494
                }
496
                }
495
                if (FileUtil.getRelativePath(pdir, loc) != null) {
497
                if (FileUtil.getRelativePath(pdir, loc) != null) {
496
                    // Inside projdir already. Skip it.
498
                    // Inside projdir already. Skip it.
497
                    continue;
499
                    continue;
498
                }
500
                }
499
                try {
501
                if (loc.isFolder()) {
500
                    Project other = ProjectManager.getDefault().findProject(loc);
502
                    try {
501
                    if (other != null) {
503
                        Project other = ProjectManager.getDefault().findProject(loc);
502
                        // This is a foreign project; we cannot own it. Skip it.
504
                        if (other != null) {
505
                            // This is a foreign project; we cannot own it. Skip it.
506
                            continue;
507
                        }
508
                    } catch (IOException e) {
509
                        // Assume it is a foreign project and skip it.
503
                        continue;
510
                        continue;
504
                    }
511
                    }
505
                } catch (IOException e) {
506
                    // Assume it is a foreign project and skip it.
507
                    continue;
508
                }
512
                }
509
                // It's OK to go.
513
                // It's OK to go.
510
                newRegisteredRoots.add(loc);
514
                newRegisteredRoots.add(loc);

Return to bug 57656