BUG: Incorrect absolute path use in HTML diff reports

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
David B. Trout
Full Member
Posts: 28
Joined: Wed Jan 06, 2010 4:21 am

BUG: Incorrect absolute path use in HTML diff reports

Post by David B. Trout »

FYI: this is a bug report that I would like to have fixed in a future version of EDP. It's pretty easy and shouldn't take but a few minutes to fix, so I'm hoping it'll get fixed right away.

When you compare two directories and "Save HTML diff report" with "Include file diffs" set to yes, an HTM file is created (along with a directory containing the individual file diffs of course).

The only problem is, the root .htm file that is created contains absolute paths! (instead of relative paths like it should).

For example: the directory comparison .htm file that gets created contains HTML code that looks like this:


<span class="c1_2h">Size</span>
<span class="c1_3h">Type</span>
<span class="c1_4h">Time</span>
<span class="c1_5h">Status</span>
<br/></div>
<div class="l lh" data-content="Newer (28 items)&nbsp;">Newer (28 items)</div>
<div class="l ln d1"><span class="c1_1"><a href="C:\Users\Fish\Downloads\bobraw-vs-hyperion\4640F0B0-7F4A-4841-BF25-B24B7A9B4C11.tmp.htm" target="_blank">cpu.c</a></span>
<span class="c1_2" style="font-weight:700;">86,499</span>
<span class="c1_3">C Source</span>
<span class="c1_4">1/8/2020 10:04:38 PM</span>
<span class="c1_5">Newer</span>
<br/></div>
<div class="l ln d1"><span class="c1_1"><a href="C:\Users\Fish\Downloads\bobraw-vs-hyperion\3A076240-B813-4787-B339-8499ED85B7B6.tmp.htm" target="_blank">dat.c</a></span>
<span class="c1_2" style="font-weight:700;">105,960</span>
<span class="c1_3">C Source</span>
<span class="c1_4">1/8/2020 10:04:38 PM</span>
<span class="c1_5">Newer</span>
<br/></div>
<div class="l ln d1"><span class="c1_1"><a href="C:\Users\Fish\Downloads\bobraw-vs-hyperion\2ED9626D-C35D-4A41-B417-51D50E76B097.tmp.htm" target="_blank">dat.h</a></span>
<span class="c1_2" style="font-weight:700;">17,003</span>
<span class="c1_3">C/C++ Header</span>
<span class="c1_4">1/8/2020 10:04:38 PM</span>
<span class="c1_5">Newer</span>
<br/></div>


Notice the absolute path being used: "<a href="C:\Users\Fish\Downloads\bobraw-vs-hyperion\...".

THIS IS INCORRECT and causes problems when the user tries moving the report from where it was created to a different directory somewhere else. For example, if the directory structure where the original diff report got created was:

Users
Fish
Downloads
bobraw-vs-hyperion

But I then a create new, differently named directory elsewhere (because I wish to consolidate several different diff reports in one place and then .zip them all and send them to someone) and try moving the originally created diff report to there:

Users
Fish
EDP-Diff-Reports
bobraw-vs-hyperion
bobclean-vs-hyperion
etc...

The .htm diff report no longer works!

It opens fine. But when I click on one of the files in the list (to see the differences for THAT file), I get a "404 File not found" error in my browser.

When I manually edit the original (base) .htm file to use RELATIVE paths instead, e.g.:


<span class="c1_2h">Size</span>
<span class="c1_3h">Type</span>
<span class="c1_4h">Time</span>
<span class="c1_5h">Status</span>
<br/></div>
<div class="l lh" data-content="Newer (28 items)&nbsp;">Newer (28 items)</div>
<div class="l ln d1"><span class="c1_1"><a href="bobraw-vs-hyperion\4640F0B0-7F4A-4841-BF25-B24B7A9B4C11.tmp.htm" target="_blank">cpu.c</a></span>
<span class="c1_2" style="font-weight:700;">86,499</span>
<span class="c1_3">C Source</span>
<span class="c1_4">1/8/2020 10:04:38 PM</span>
<span class="c1_5">Newer</span>
<br/></div>
<div class="l ln d1"><span class="c1_1"><a href="bobraw-vs-hyperion\3A076240-B813-4787-B339-8499ED85B7B6.tmp.htm" target="_blank">dat.c</a></span>
<span class="c1_2" style="font-weight:700;">105,960</span>
<span class="c1_3">C Source</span>
<span class="c1_4">1/8/2020 10:04:38 PM</span>
<span class="c1_5">Newer</span>
<br/></div>
<div class="l ln d1"><span class="c1_1"><a href="bobraw-vs-hyperion\2ED9626D-C35D-4A41-B417-51D50E76B097.tmp.htm" target="_blank">dat.h</a></span>
<span class="c1_2" style="font-weight:700;">17,003</span>
<span class="c1_3">C/C++ Header</span>
<span class="c1_4">1/8/2020 10:04:38 PM</span>
<span class="c1_5">Newer</span>
<br/></div>


(Notice the "href=": it is now RELATIVE, not absolute!)

Then it works fine! I can move the base .htm file (and its associated file diffs directory too of course) to ANYWHERE, into any named directory I want, and it works fine. I open the based .htm, click on one of the files listed, and the file diff appears as expected, just as it should.

As I said, this bug -- AND IT IS A BUG in my opinion -- can likely be fixed so quickly and easily that I'm hoping the EDP teams can get it fixed ASAP.

Thank you for your attention and THANK YOU for such a great product! I've been a fan for years and years now and EDP ROCKS! :)
"Fish" (David B. Trout)
"Programming today is a race between
software engineers striving to build bigger
and better idiot-proof programs, and the
Universe trying to produce bigger and better
idiots. So far, the Universe is winning"
- Rich Cook
User avatar
psguru
Site Admin
Posts: 2228
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: BUG: Incorrect absolute path use in HTML diff reports

Post by psguru »

Good point. The fix will appear in the next builds of 10.0 and 11.0 Beta.
psguru
PrestoSoft
Post Reply