[Mono-list] Filenames with spaces in it

A Rafael D Teixeira rafaelteixeirabr@hotmail.com
Tue, 13 Aug 2002 08:10:30 -0300


First testing some hipothesys.

A simple program as this (just the Main method here)

static void Main(string[] args)
{
  for(int i = 0; i < args.Length; i++)
    Console.WriteLine("args[{0}] = \"{1}\"",i,args[i]);
}

compiled with csc and run in windows with these parameters give

>getopttest --help --param="what it takes.dll" "filename with spaces.cs" 
>without quotes it must fail.cs

args[0] = "--help"
args[1] = "--param=what it takes.dll"
args[2] = "filename with spaces.cs"
args[3] = "without"
args[4] = "quotes"
args[5] = "it"
args[6] = "must"
args[7] = "fail.cs"

So the runtime does some parameter processing before handing them to Main, 
see what happened to args[1] in special.

My Linux box is out of commission, and I don't have jit/mint running on my 
Win2K box. Could someone run this small test with jit/mint, both compiled 
with csc and with mcs.

My guess is the runtime isn't making the same preprocessing of double-quoted 
parameters.


Happy hackings


Rafael Teixeira
Brazilian Polymath


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx