| Index: delta_diff_generator.cc
|
| diff --git a/delta_diff_generator.cc b/delta_diff_generator.cc
|
| index ccdf27ad5ce56341ccbfde8ac0bc5299a5f0da7a..82bce8a5ca024ab728414e5dfc625370e6aed3a3 100644
|
| --- a/delta_diff_generator.cc
|
| +++ b/delta_diff_generator.cc
|
| @@ -169,11 +169,11 @@ bool DeltaReadFiles(Graph* graph,
|
| // from using a graph/cycle detection/etc to generate diffs, and at that
|
| // time, it will be easy (non-complex) to have many operations read
|
| // from the same source blocks. At that time, this code can die. -adlr
|
| - bool should_diff_from_source = true;
|
| + bool should_diff_from_source = false;
|
| string src_path = old_root + fs_iter.GetPartialPath();
|
| - if (utils::FileExists(src_path.c_str())) {
|
| - struct stat src_stbuf;
|
| - TEST_AND_RETURN_FALSE_ERRNO(0 == stat(src_path.c_str(), &src_stbuf));
|
| + struct stat src_stbuf;
|
| + if (0 == lstat(src_path.c_str(), &src_stbuf) &&
|
| + S_ISREG(src_stbuf.st_mode)) {
|
| should_diff_from_source = !utils::SetContainsKey(visited_src_inodes,
|
| src_stbuf.st_ino);
|
| visited_src_inodes.insert(src_stbuf.st_ino);
|
|
|