[Mono-bugs] [Bug 611956] New: mkbundle2 seems to encode directory in which .exe was bundled - when fetching command line args

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jun 5 01:11:28 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=611956

http://bugzilla.novell.com/show_bug.cgi?id=611956#c0


           Summary: mkbundle2 seems to encode directory in which .exe was
                    bundled - when fetching command line args
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: brett_senior at yahoo.com.au
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9)
Gecko/20100501 Iceweasel/3.5.9 (like Firefox/3.5.9)

If I take a .exe and then run "mkbundle2 -o tmp tmp.exe" when I am in my home
directory (in my case /home/brett - but treat this as ~) then when I run the
resulting bundle (after moving it to a common directory in say /usr/local/bin)
and fetch the command line via "System.Environment.GetCommandLineArgs()" then I
find that I get "/home/brett/tmp" as the value in element zero.  I would have
thought that I should get "/usr/local/bin/tmp" (ie the directory in which the
bundle has been run from) and not "/home/brett/tmp".  So I tried moving the
exe to "/home/brett/tmp" and then runnng the above mkbundle2 command and then
I find that the command line is "/home/brett/tmp/tmp" - it seems to be saving
where the bundle was compiled from somewhere and then when I fetch the command
line I get this and not where it it running from.  Note that I have been using
/home/brett as my development directories have a C# directory and mkbundle2
does not allow # characters in the filename - so I have to do it this way via a
script that copies the file to ~, does the mkbundle2 and then copies the file
back to my bin/Release directory (I use monodevelop).

Reproducible: Always

Steps to Reproduce:
1."mkbundle2 -o tmp tmp.exe"
2../tmp
3. Fetch command line arguments in tmp.exe via 
"System.Environment.GetCommandLineArgs()"
Actual Results:  
You get the directory in which the bundle has been created and not the
directory from which the bundle is running.

Expected Results:  
Should get the directory from which the bundle is running and not the directory
of creation.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list