3r1co / hg4j

Automatically exported from code.google.com/p/hg4j
GNU General Public License v2.0
0 stars 1 forks source link

Symlink files are always reported as modified #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In a repository with symbolic links linked files are always reported as 
modified (even when clean)

Apparently, new FileInputStream(file).getChannel() in 
RegularFileInfo#newInputChannel() doesn't follow symlink.

Original issue reported on code.google.com by tikhomir...@gmail.com on 1 Mar 2012 at 12:05

GoogleCodeExporter commented 8 years ago
Not only newInputChannel() is flawed, a lot of other places need to care about 
symlinks, too. Revision 7f27122011c3 captures most of them.

Mark this as fixed, although there's minor deficiency, 
RegularFileInfo#lastModified doesn't supply correct timestamp for symbolic 
links. It results in a slowdown (content, i.e. link target value, is checked in 
this case). However, decent clients would use own FileInfo implementations free 
of this defect.

Original comment by tikhomir...@gmail.com on 21 Mar 2012 at 7:48