From: NHibernate J. <mik...@us...> - 2007-01-04 11:29:34
|
[ http://jira.nhibernate.org/browse/NH-850?page=all ] Sergey Koshcheyev closed NH-850: -------------------------------- Resolution: Fixed > Non-portable file path for generated source files by hbm2net > ------------------------------------------------------------ > > Key: NH-850 > URL: http://jira.nhibernate.org/browse/NH-850 > Project: NHibernate > Type: Bug > Components: Contrib > Versions: 1.0.3 > Reporter: Sebastian Brady > Priority: Minor > Fix For: 1.2.0.Beta3 > > NHibernate.Tools.hbm2net uses non-portable path names for the files it generates. The hardcoded path separator ("\") won't work on Unix-like systems. > The System.IO.Path methods should be used to build the path name. > Suggest that in the NHibernate.Tool.hbm2net.Generator.write() method (file: src/NHibernate.Tool.hbm2net/Generator.cs, line 152) > FileInfo file = new FileInfo(dir.FullName + "\\" + this.getFileName(saveToClassName)); > becomes > FileInfo file = new FileInfo(System.IO.Combine(dir.FullName, this.getFileName(saveToClassName)); > And, in NHibernate.Tool.hbm2net.Generator.getDir() method (line 203) > dir = new FileInfo(baseDir.FullName + "\\" + p.Replace(StringHelper.Dot, Path.DirectorySeparatorChar)); > becomes > dir = new FileInfo(System.IO.Combine(baseDir.FullName, > p.Replace(StringHelper.Dot, Path.DirectorySeparatorChar))); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |