Author Topic: vsdiff 0 byte files  (Read 717 times)

Nosh

  • Community Member
  • Posts: 38
  • Hero Points: 1
vsdiff 0 byte files
« on: September 02, 2018, 07:33:40 pm »
If you compare two files with vsdiff (vsdiff file1.txt file2.txt) where one file has a size of 0 bytes and the other not, then a dialog opens with "Files match, view them anyway?"

But if you compare two files with size 0, the compare window opens.

Should be the other way round.

Regards, Norbert

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4796
  • Hero Points: 388
Re: vsdiff 0 byte files
« Reply #1 on: September 02, 2018, 09:54:52 pm »
Good catch. We will look into this.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2358
  • Hero Points: 131
Re: vsdiff 0 byte files
« Reply #2 on: September 04, 2018, 07:18:59 pm »
Fixed for beta 4.  Thanks for the report.

Nosh

  • Community Member
  • Posts: 38
  • Hero Points: 1
Re: vsdiff 0 byte files
« Reply #3 on: October 15, 2018, 07:55:05 pm »
Thank you for your fix, but it is only a partial fix.
When you compare two 0 byte files with 'vsdiff left.txt right.txt' the diff window opens instead of the dialog "files match..."
Also the left side shows an empty line and the right side 'imaginary buffer line'.

When you compare two files, where only one file has 0 bytes the diff result differs depending on if the 0 byte file comes first or second.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2358
  • Hero Points: 131
Re: vsdiff 0 byte files
« Reply #4 on: October 15, 2018, 08:13:06 pm »
Thank you for your fix, but it is only a partial fix.
When you compare two 0 byte files with 'vsdiff left.txt right.txt' the diff window opens instead of the dialog "files match..."
Also the left side shows an empty line and the right side 'imaginary buffer line'.
Thanks, I'll look into this

When you compare two files, where only one file has 0 bytes the diff result differs depending on if the 0 byte file comes first or second.
I'm not sure I understand what you mean.  In my tests here, all the lines are on one side or the other as they should be.  Are you seeing something different?

Nosh

  • Community Member
  • Posts: 38
  • Hero Points: 1
Re: vsdiff 0 byte files
« Reply #5 on: October 15, 2018, 08:28:04 pm »
When the first file is the 0 byte file it looks like 1.png in the attachment.
When the second file is the 0 byte file it looks like 2.png in the attachment.

Empty line vs 'Imaginary Buffer Line'.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2358
  • Hero Points: 131
Re: vsdiff 0 byte files
« Reply #6 on: October 15, 2018, 08:31:18 pm »
Hm.  Thank you.

I can't reproduce this one.  I noticed that the filenames on the blank files are different.  Is there a chance that one of them isn't 0 bytes?
« Last Edit: October 15, 2018, 08:47:07 pm by Dan »