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();
|
IPath location= file.getLocation();
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
File f= location.toFile();
|
File f= location.toFile();
|
||||||
if (f.exists()) {
|
if (f.isFile()) {
|
||||||
try {
|
try {
|
||||||
byte[] checksum= computeChecksum(md, f);
|
byte[] checksum= computeChecksum(md, f);
|
||||||
putChecksum(result, file, checksum);
|
putChecksum(result, file, checksum);
|
||||||
|
|
|
@ -303,9 +303,14 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
|
||||||
IPath location= tu.getLocation();
|
IPath location= tu.getLocation();
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
try {
|
try {
|
||||||
byte[] checksum= Checksums.computeChecksum(md, location.toFile());
|
final File file = location.toFile();
|
||||||
if (!Arrays.equals(checksum, cs.fChecksum)) {
|
if (!file.isFile()) {
|
||||||
i.remove();
|
i.remove();
|
||||||
|
} else {
|
||||||
|
byte[] checksum= Checksums.computeChecksum(md, file);
|
||||||
|
if (!Arrays.equals(checksum, cs.fChecksum)) {
|
||||||
|
i.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue