Skip to content

Commit

Permalink
Fixes microsoft#810 Referencing several Python extension modules does…
Browse files Browse the repository at this point in the history
… not work

Compares last modified time against the file referenced by the row, rather than the newly added extension.
  • Loading branch information
zooba committed Oct 6, 2015
1 parent 4c269ae commit e5ae739
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,13 @@ private static string FindDbFile(IPythonInterpreterFactory interpreter, string e
DateTime lastModified;
if (!File.Exists(columns[extensionModuleFilenameIndex]) || // extension has been deleted
!DateTime.TryParseExact(columns[extensionTimeStamp], "O", null, System.Globalization.DateTimeStyles.RoundtripKind, out lastModified) ||
lastModified != new FileInfo(extensionModuleFilename).LastWriteTime) { // extension has been modified
lastModified != File.GetLastWriteTime(columns[extensionModuleFilenameIndex])) { // extension has been modified

// cleanup the stale DB files as we go...
try {
File.Delete(columns[4]);
File.Delete(columns[dbFileIndex]);
} catch (IOException) {
} catch (UnauthorizedAccessException) {
}
continue;
}
Expand Down

0 comments on commit e5ae739

Please sign in to comment.