[Mono-devel-list] Problems with IO.Directory.Exists and AppDomain.CurrentDomain.BaseDirectory
Ivan Hawkes
blackhawk at ivanhawkes.com
Sun Jul 6 00:12:21 EDT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gonzalo Paniagua Javier wrote:
| El s?, 05-07-2003 a las 21:45, Ivan Hawkes escribió:
|
|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>The wheels of conversion move onwards and I am now at the next
problem. I have
|>a sample ASPX page that calls a library which is also shared with my
little
|>simpletest.exe program. The simpletest.exe program runs the code fine
and the
|>ASPX doesn't. It comes down to a difference in the way they are
implementing
|>AppDomain.CurrentDomain.BaseDirectory.
|>
|>simpletest.exe returns a result similar to this:
|>
|>/home/ivan/simpletest/
|>
|>and ASPX program returns this:
|>
|>file:///home/ivan/christinahawkes/
|>
|>As you can see, the ASPX program has pre-pended the dir with file://.
This may
|>or may not be valid behaviour since it's hard to tell from the MS
docs. The
|>problem comes in when I make a call to IO.Directory.Exists. The first
form is
|>acceptable and returns a correct result, but the one starting with
file:///
|>is not acceptable and returns a false, even though that dir actually
exists.
|>
|>Is this a problem with the runtime? Should IO.Directory.Exists be able to
|>parse file:// etc?
|
|
| Can you, please, try that on MS?
|
| -Gonzalo
Ok, I've now tested it on MS (and seriously have to get some sleep now)
and the results are:
1. Standalone app returns
D:\Dev\simpletest\bin\Debug\
2. ASPX test page returns
d:/www/christinahawkes/
So in neither case should file:// be at the front. Also, Exists will
return false if the path starts with file://
So, looks like the ASPX handling of AppDomain.CurrentDomain.BaseDirector
needs to remove the file:// from the start of what it returns.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQIVAwUBPwehpfr1e7bH1pzBAQJPVhAAhm6Dpan+512PcO5TnXj+0/Fc0E+dRBsg
rdqriYsW7bwdAMpLphhguntZJ58UPFvJ+hr4gES2nN555BFpeUuR5J3mX7h9il3z
7Kj4+UVUDUKU6hiQl4KHf7lMt5PH1C2K51eFlnErxmdoJKOLtfQU9Q7y3BZMOYvi
O0GnCpbnKQs6UnGn6RgXV58gNxJSg0cXJGDYTV76JjW78fR6NYnHvO8WAhMG3ZIe
aSm6jjxPh96aN5BvvorAAngAZY0/8iH9IXwl3/k98vQRcueYylwDL99fNB3Xaycu
SqrRrnGlgjw5EMemG183XandG4bEooHqcLtg12xCA9rjWgI8oyg83DZYrCahEd/o
eFmSS4r7ncAjAXG3qW9BqyVn5cFtrSEE59Gswrt+ElOrjGtL7k/ArxrN/iuuxK3U
qhwWPWlOAZ60gq5QfKiV9BDeOJ/ChimSZHR6oVsmk3w0chHztMbzQA5dy23JKh5u
KcYzit3BCtJJjwOfy9GHrZbfysBReRNPkvSHUcfMuImoRU8toapfVNR9kqGKvQ0y
Vs5xwQ/zR1G2MAwAfuG+wp6XIXM0fzZC6kvukG6dK1d/jTOavd9WPkyd3qvpxgNX
aANux2fG2CvbzGLKsMEC4rj+XxcqLtKv06Wc3vGpbvwc5Ut8/OiQsZK/N8eES0U+
uBTi4XjA5MU=
=Cut6
-----END PGP SIGNATURE-----
More information about the Mono-devel-list
mailing list