Re: Packing a C# project.

"Neil Munro" <[email protected]>
Newsgroups gmane.comp.autopackage.devel
Message-ID <[email protected]>
My application is eventually going to be a root app, it's a software update
tool which is why I assumed the user WOULD have write access. But if the
file is not in the share directory and I create it in /home/whatever it
makes the checks for the file in share pointless, I'm confused. :s

If warp runs in /usr/bin and it's data files are in /usr/share why must I
place warps data files in /home? Or would you argue these files are not data
files but user config files?

2008/6/11 Isak Savo <[email protected]>:

> On Tue, Jun 10, 2008 at 9:11 PM, Neil Munro <[email protected]> wrote:
> >
> > Question
> >
> >                 // Create the whitelist file.
> >                 if ( sTemp == "w" )
> >                 {
> >                     if ( !File.Exists( Path.Combine( BinReloc.DataDir,
> > "whitelist.txt" ) ) )
> >                     {
> >                         File.Create( Path.Combine( BinReloc.DataDir,
> > "whitelist.txt" ) );
> >                     }
> >
> >                     vEditFilter( "white" );
> >                 }
> >  To do something like the above should it work like this:
> >
> >                 // Create the whitelist file.
> >                 if ( sTemp == "w" )
> >                 {
> >                     if ( !File.Exists( Path.Combine( BinReloc.DataDir,
> > "whitelist.txt" ) ) && !File.Exists( "../share/whitelist" ) )
> >                     {
> >                         File.Create( Path.Combine( BinReloc.DataDir,
> > "whitelist.txt" ) );
> >                     }
> >
> >                     vEditFilter( "white" );
> >                 }
> > Just a bit confused and wondering if my checks are in the right places.
>
> No no no! Never assume you have write access to the datadir. On linux
> and other unix systems you are only allowed to write to the users home
> directory. The datadir location should be considered read only, even
> for the root user (it could actually be on a read-only filesystem)
>
> You can get the home directory from the system by calling:
> string homeDir =
> Environment.GetSpecialFolder(Environment.SpecialFolder.Personal);
>
> -Isak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected]
> For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.