Second attempt at Bug 5747 change: Deal with possible ending "/" this time.
authorRob Wilkens <RobWilkens@gmail.com>
Sat, 30 Jun 2012 00:35:19 +0000 (20:35 -0400)
committerRob Wilkens <RobWilkens@gmail.com>
Sat, 30 Jun 2012 00:35:19 +0000 (20:35 -0400)
commit119b90edea550904c24738674d375b8e016ee1a0
treed931a8589597ea0ece5cb5b0dce5633d3b490353
parentb91cbba739ec7ef16e325efabcb36e971f8751ff
Second attempt at Bug 5747 change: Deal with possible ending "/" this time.

My first fix for Bug 5747 was reverted because it broke something with
file system monitoring in XSP.

This is a revision of that same patch, but this time i take into account
the possibility that the fsw.FullPath value could possibly end with "/".
The previous version of this commit, no longer in place, didn't factor
that in and as a result if the fullpath ended in "/" we would cut the first
character off filename by virtue of the "Length + 1" substring.

The purpose of this patch was to fix the following problem:
files/directories modified in subdirectories were coming back with
just the file NAME and not subdirectory path.  This patch modifies
the filename so if you get an alert on a file in a subdirectory 'mysubdir/file1'
you would get 'mysubdir/file1' rather than just 'file1', for whatever
direcotry (fullpath) you are watching..

Please note, i tried but i can't get XSP from git to use my local development
version of mono -- as a result i couldn't test against XSP.  Instead, i tested
against the bug report source sample both with and without a trailing '/'
separator.  Prior to this revised version, if full pathname ended in a trailing
'/', and you modified 'file1' you would get back 'ile1' a as the filename if
the prior patch was applied.

Someone may want to test against xsp before accepting this revised submission
mcs/class/System/System.IO/KeventWatcher.cs