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:
parent
a7e14e4271
commit
4ad132f821
2 changed files with 8 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue