mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't clean up builtins skeleton file even if we cannot parse its header (PY-7451)
This commit is contained in:
@@ -470,13 +470,14 @@ public class PySkeletonRefresher {
|
||||
final String itemName = item.getName();
|
||||
if (PyNames.INIT_DOT_PY.equals(itemName) && item.length() == 0) continue; // these are versionless
|
||||
if (BLACKLIST_FILE_NAME.equals(itemName)) continue; // don't touch the blacklist
|
||||
if (PythonSdkType.getBuiltinsFileName(mySdk).equals(itemName)) {
|
||||
continue;
|
||||
}
|
||||
final SkeletonHeader header = readSkeletonHeader(item);
|
||||
boolean canLive = header != null;
|
||||
if (canLive) {
|
||||
final String binaryFile = header.getBinaryFile();
|
||||
final String builtinsFileName = PythonSdkType.getBuiltinsFileName(mySdk);
|
||||
canLive = SkeletonVersionChecker.BUILTIN_NAME.equals(binaryFile) || builtinsFileName.equals(itemName) ||
|
||||
mySkeletonsGenerator.exists(binaryFile);
|
||||
canLive = SkeletonVersionChecker.BUILTIN_NAME.equals(binaryFile) || mySkeletonsGenerator.exists(binaryFile);
|
||||
}
|
||||
if (!canLive) {
|
||||
mySkeletonsGenerator.deleteOrLog(item);
|
||||
|
||||
Reference in New Issue
Block a user