From e5ae739b401ed6dea09fa316854ebca0e41fb0b7 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 6 Oct 2015 10:22:18 -0700 Subject: [PATCH] Fixes #810 Referencing several Python extension modules does not work Compares last modified time against the file referenced by the row, rather than the newly added extension. --- Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs b/Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs index 6b883b6a63..9dc247fd0d 100644 --- a/Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs +++ b/Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs @@ -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; }