Thread: Re: [HACKERS] Win32 sysconfig -> pg_service.conf
Bruce Momjian said: > > On Win32, patch applied to return path if GetShortPathName() fails (no short name, path does not exist), rather than returning nothing. > What made you choose this rather than GetFullPathName? cheers andrew
Andrew Dunstan wrote: > Bruce Momjian said: > > > > On Win32, patch applied to return path if GetShortPathName() fails (no > short name, path does not exist), rather than returning nothing. > > > > What made you choose this rather than GetFullPathName? Sure, we can do that. Does GetFullPathName() work if the path does not exist? How is it different from the path we pass to it? Aren't all those paths full already? -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote: >Andrew Dunstan wrote: > > >>Bruce Momjian said: >> >> >>>On Win32, patch applied to return path if GetShortPathName() fails (no >>> >>> >>short name, path does not exist), rather than returning nothing. >> >> >>What made you choose this rather than GetFullPathName? >> >> > >Sure, we can do that. Does GetFullPathName() work if the path does not >exist? > yes. see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfullpathname.asp > How is it different from the path we pass to it? Aren't all >those paths full already? > > > If they are then it probably doesn't matter. cheers andrew
Andrew Dunstan wrote: > >>What made you choose this rather than GetFullPathName? > >> > >> > > > >Sure, we can do that. Does GetFullPathName() work if the path does not > >exist? > > > > yes. see > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfullpathname.asp > > > How is it different from the path we pass to it? Aren't all > >those paths full already? > > > > > > > > If they are then it probably doesn't matter. The reason I don't want to use GetFullPathName() is because on Unix, we just return the specified path, not the full path, so I don't want to do something different on Win32 unless we have to. There is good reason to get the short path on Win32, if we can, but no logic to returning the full path only on Win32, if that is not what was specified by configure. -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote: >>> How is it different from the path we pass to it? Aren't all >>> those paths full already? >>> >> If they are then it probably doesn't matter. >> > > The reason I don't want to use GetFullPathName() is because on Unix, we > just return the specified path, not the full path, so I don't want to do > something different on Win32 unless we have to. There is good reason to > get the short path on Win32, if we can, but no logic to returning the > full path only on Win32, if that is not what was specified by configure. > > OK cheers andrew