#At file:///C:/work/wex/absv2/ based on revid:reggie.burnett@stripped
39 Reggie Burnett 2012-09-17
small correction in how we validate a product file
modified:
AbsUtility/ProductFile.cs
=== modified file 'AbsUtility/ProductFile.cs'
=== modified file 'AbsUtility/ProductFile.cs'
--- a/AbsUtility/ProductFile.cs 2012-09-17 22:01:12 +0000
+++ b/AbsUtility/ProductFile.cs 2012-09-17 22:39:01 +0000
@@ -52,12 +52,16 @@
throw new Exception("Every product file requires a regular expression");
if (Generated && String.IsNullOrEmpty(GenerationScript))
throw new Exception("Generated files require a supplied generation script");
+ File = null;
string[] files = Utility.MatchFiles(Product.IncomingFolder, RegularExpression);
- if (files.Length != 1 && checkGenerated)
+ if (files != null && files.Length == 1)
+ {
+ File = files[0];
+ if (Utility.FileIsLocked(File))
+ throw new Exception(String.Format("File matching expression {0} is still locked", RegularExpression));
+ }
+ if (checkGenerated)
throw new Exception("Regular expression did not match exactly 1 file");
- File = files[0];
- if (Utility.FileIsLocked(File))
- throw new Exception(String.Format("File matching expression {0} is still locked", RegularExpression));
}
public bool Build(Version newVersion)
Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20120917223901-ng1a1exqnfzjrr0o.bundle
| Thread |
|---|
| • bzr commit into ABSv2 branch (reggie.burnett:39) | Reggie Burnett | 19 Sep |