diff --git a/Microsoft.Research/Contracts/MsCorlib/System.IO.Path.cs b/Microsoft.Research/Contracts/MsCorlib/System.IO.Path.cs index b6bb5b45..0bae2087 100644 --- a/Microsoft.Research/Contracts/MsCorlib/System.IO.Path.cs +++ b/Microsoft.Research/Contracts/MsCorlib/System.IO.Path.cs @@ -216,8 +216,8 @@ public static string GetRandomFileName() public static string GetTempFileName() { - Contract.Ensures(!string.IsNullOrWhitespace(Contract.Result())); - Contract.Ensures(Contract.Result().Length >= 4); + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result().Length >= 4, @" length >= 4 since file name must end with '.TMP'"); Contract.EnsuresOnThrow(true, @"An I/O error occurs, such as no unique temporary file name is available. - or - This method was unable to create a temporary file."); return default(string); }