~ubuntu-branches/ubuntu/lucid/monodevelop/lucid

« back to all changes in this revision

Viewing changes to src/addins/CBinding/Gui/EditPackagesDialog.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-01-10 14:25:59 UTC
  • mfrom: (1.2.5 upstream) (1.3.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100110142559-sorji5exvk9tyknr
Tags: 2.2+dfsg-2
* debian/rules/remove_support_for_non_debian_functionality.patch:
  + Also fix monodevelop-core-addins.pc to remove links to the
    addins we remove in Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
                        Package package;
195
195
                        
196
196
                        foreach (SolutionItem c in project.ParentFolder.Items) {
197
 
                                if (c is CProject) {
 
197
                                if (null != c && c is CProject) {
198
198
                                        CProject cproj = (CProject)c;
199
199
                                        CProjectConfiguration conf = (CProjectConfiguration)cproj.GetConfiguration (IdeApp.Workspace.ActiveConfiguration);
200
200
                                        if (conf.CompileTarget != CBinding.CompileTarget.Bin) {
201
 
                                                cproj.WriteMDPkgPackage (conf.Id);
 
201
                                                cproj.WriteMDPkgPackage (conf.Selector);
202
202
                                                package = new Package (cproj);
203
203
                                                packages.Add (package);
204
204
                                        }
439
439
                private bool IsValidPackage (string package)
440
440
                {
441
441
                        bool valid = false;
442
 
                        StreamReader reader = new StreamReader (package);
443
 
                        
444
 
                        string line;
445
 
                        
446
 
                        while ((line = reader.ReadLine ()) != null) {
447
 
                                if (line.StartsWith ("Libs:", true, null) && line.Contains (" -l")) {
448
 
                                        valid = true;
449
 
                                        break;
 
442
                        try {
 
443
                                using (StreamReader reader = new StreamReader (package)) {
 
444
                                        string line;
 
445
                                        
 
446
                                        while ((line = reader.ReadLine ()) != null) {
 
447
                                                if (line.StartsWith ("Libs:", true, null) && line.Contains (" -l")) {
 
448
                                                        valid = true;
 
449
                                                        break;
 
450
                                                }
 
451
                                        }
450
452
                                }
 
453
                        } catch { 
 
454
                                // Invalid file, permission error, broken symlink
451
455
                        }
452
 
                        reader.Close ();
453
456
                        
454
457
                        return valid;
455
458
                }