[Mono-bugs] [Bug 46609][Nor] Changed - AppDomain.BaseDirectory misses trailing directoryseparator on linux
Mon, 24 May 2004 21:26:03 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/46609 2003-07-20 05:49:09.000000000 -0400
+++ shadow/46609.tmp.14639 2004-05-24 21:26:03.000000000 -0400
@@ -1,8 +1,8 @@
-Product: Mono/Class Libraries
+Product: Mono: Class Libraries
OS: GNU/Linux [Other]
OS Details: Gentoo 1.4 R5
@@ -10,13 +10,12 @@
Summary: AppDomain.BaseDirectory misses trailing directoryseparator on linux
On Windows (with both .NET and Mono), AppDomain.BaseDirectory returns the
application base directory with a trailing backslash.
However, on Linux the AppDomain.BaseDirectory returns the application base
@@ -33,6 +32,67 @@
------- Additional Comments From email@example.com 2003-07-20 05:49 -------
Fixed in CVS.
+------- Additional Comments From firstname.lastname@example.org 2003-11-23 04:56 -------
+Gonzalo, apparently the fix for this issue was removed by yourself as
+part of revision 1.12 of AppDomainSetup.cs with the following
+ AppDomainSetup.cs: Don't add an extra '/' at the end of
+ ApplicationBase. The tests pass now with mono.
+However, not adding the extra '/' at the end of ApplicationBase makes
+the Mono implementation incompatible with .NET.
+Can you explain why you had to remove the extra '/' at the end ?
+------- Additional Comments From email@example.com 2003-12-11 13:40 -------
+Someone provided a test case that lead me to do that.
+If something is wrong (mmm, may be for '/'...) could you provide a
+------- Additional Comments From firstname.lastname@example.org 2003-12-13 04:16 -------
+I looked further into the AppDomain.BaseDirectory issue, with regards
+to the ending DriecftorySeparatorChar, and I've come to the following
+- .NET never alters the path you pass into the AppDomain (by setting
+AppDomainSetup.ApplicationBase), unless its a URI ofcourse ... so it
+definitely does not add a DirectorySeparatorChar to the path. Which
+means the current behaviour of Mono is correct.
+- when no explicit base directory is set for a newly created
+AppDomain, the base directory of the "root" AppDomain will be used ->
+note : I'm not 100% sure about this
+- the .NET runtime does add a DirectorySeparatorChar to the end of the
+BaseDirectory (and AppDomainSetup.ApplicationBase) for domains
+constructed by the runtime itself. eg. when you launch a console
+app, winform app or web app, the appdomains for these apps will have
+a trailing DirectorySeparatorChar. This should be fixed in Mono.
+I attached a simple unit tests for AppDomain (tests 2 and 4 fail on
+Mono right now), and an even simpler test app that demonstrates the
+fact the .NET adds a DirectorySeparatorChar to the end of the
+BaseDirectory for appdomains that are created by the runtime itself,
+as I don't know how to test this as part of a unit test ...
+------- Additional Comments From email@example.com 2003-12-13 04:17 -------
+Created an attachment (id=6228)
+small unit tests for System.AppDomain
+------- Additional Comments From firstname.lastname@example.org 2003-12-13 04:18 -------
+Created an attachment (id=6229)
+(very) small test app that demonstrate difference between Mono and .NET with regards to the AppDomain.BaseDirectory for console apps
+------- Additional Comments From email@example.com 2004-05-24 21:26 -------
+Works with current CVS.