Re: Packing a C# project.
"Neil Munro" <[email protected]> Wed, 11 Jun 2008 20:27:24 +0100
| Newsgroups | gmane.comp.autopackage.devel |
|---|---|
| Message-ID | <[email protected]> |
What version of Mono provides the GetSpecialFolder function/attribute? Because my version of mono does not have a definition for GetSpecialFolder :S I tried to use Environment.SpecialFolder.Personal + "/.config/warp/<somefile>" but this did not work. 2008/6/11 Neil Munro <[email protected]>: > Opps, right will do. Thanks. > > 2008/6/11 Jan Niklas Hasse <[email protected]>: > > On Wed, Jun 11, 2008 at 9:11 PM, Neil Munro <[email protected]> wrote: >> > Damn run into an issue, not sure if anyone can help me solve it though, >> > since I am removing all the code i previously entered which I did not >> need. >> > I have a bug in that I specify a path >> > >> > string sFileName = "~/.config/warp/feeds.txt"; >> > FileStream Feeds = new FileStream( sFileName, FileMode.Open, >> FileAccess.Read >> > ); >> > StreamReader Reading = new StreamReader( Feeds ); >> > >> > But I get this error at runtime: >> > Could not find a part of the path >> > >> "/home/niadh/Dev/warp/trunk/WarpCoreV2/bin/Debug/bin/~/.config/warp/feeds.txt".. >> > >> > Obviously files are still being treated relatively, anyone know how to >> work >> > around this? >> >> The problem is you can also name folders ~. Using ~ for your home >> directory is only valid in a bash. As Isak said, you should call >> Environment.GetSpecialFolder(Environment.SpecialFolder.Personal) to >> get the path to the users home directory. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected] >> For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected] >> >> >