1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Check for directories during import/export of team-shared index database, related to bug 243682.

This commit is contained in:
Markus Schorn 2008-12-09 11:51:30 +00:00
parent a7e14e4271
commit 4ad132f821
2 changed files with 8 additions and 3 deletions

View file

@ -115,7 +115,7 @@ public class Checksums {
IPath location= file.getLocation();
if (location != null) {
File f= location.toFile();
if (f.exists()) {
if (f.isFile()) {
try {
byte[] checksum= computeChecksum(md, f);
putChecksum(result, file, checksum);

View file

@ -303,9 +303,14 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
IPath location= tu.getLocation();
if (location != null) {
try {
byte[] checksum= Checksums.computeChecksum(md, location.toFile());
if (!Arrays.equals(checksum, cs.fChecksum)) {
final File file = location.toFile();
if (!file.isFile()) {
i.remove();
} else {
byte[] checksum= Checksums.computeChecksum(md, file);
if (!Arrays.equals(checksum, cs.fChecksum)) {
i.remove();
}
}
}
catch (IOException e) {