* Directory.cs (ValidateDirectoryListing): Removing an unnecessary
Path.Combine call. Part of the fix for bug #580090.
Code is contributed under MIT/X11 license.
svn path=/trunk/mcs/; revision=159860
* FileStream.cs: when running on Windows and a path with Unix
directory separator chars is passed (including an UNC share), get
the canonical form of the path before attempting to retrieve its
directory name. Fixes bug #607502
* Path.cs: typo fix
svn path=/trunk/mcs/; revision=157650
* Path.cs: vararg overload of Combine now correctly concatenates
segments.
The 3 and 4 argument overloads of Combine check whether the passed
segments are null or not.
2010-05-08 Marek Habersack <[email protected]>
* PathTest.cs: added tests for the 4.0 Combine overloads.
svn path=/trunk/mcs/; revision=156928
* Directory.cs: Ensure elevated trust when calling on
Moonlight.
* DirectoryInfo.cs: Ensure elevated trust when calling a .ctor
on Moonlight.
* File.cs: Ensure elevated trust when calling a .ctor on
Moonlight.
* FileInfo.cs: Ensure elevated trust when calling a .ctor on
Moonlight.
* FileStream.cs: Ensure elevated trust when calling a .ctor on
Moonlight. Name property returns "[Unknown]" unless a Moonlight
application is executed with elevated trust.
* Path.cs: Ensure elevated trust when calling a GetTempPath,
GetTempFileName or GetFullPath on Moonlight. Add a shared
internal method to validate paths to reduce code duplication.
svn path=/trunk/mcs/; revision=155643
* DirectoryInfo.cs, FileInfo.cs: Moonlight needs the default ctor
to decorate them with [SecuritySafeCritical] for corclr
inheritance rules
svn path=/trunk/mcs/; revision=154364
* Directory.cs: a directory named ":" is legal in unix.
This gets rid of the annoying ":" folder when running
corlib tests.
svn path=/trunk/mcs/; revision=154189
* Directory.cs, DirectoryInfo.cs: Disble new NET_4_0 API used in
SL4 until we have elevated trust working correctly (since they
are *not* decorated as [SecurityCritical])
svn path=/trunk/mcs/; revision=153968
* StreamReader.cs: if the detected encoding is different from the
provided to the constructor, adjust the decoded buffer size if
needed. Fixes bug #589236.
svn path=/trunk/mcs/; revision=153799
2010-03-12 Sebastien Pouliot <[email protected]>
* Tuple.cs, Tuples.cs: Add them to NET_2_1 since they are parts
of SL4
In System.Collections:
2010-03-12 Sebastien Pouliot <[email protected]>
* IStructuralComparable.cs, IStructuralEquatable.cs: Add them to
NET_2_1 since they are parts of SL4
In System.IO:
2010-03-12 Sebastien Pouliot <[email protected]>
* File.cs: Enable some NET_4_0 features in NET_2_1 since they are
part of SL4. Throw a SecurityException in Moonlight in non-debug
builds until we're ready for elevated trust.
svn path=/trunk/mcs/; revision=153506
* MemoryStream.cs: When setting Capacity, don't create a new buffer if
the new expected value is the same as the current one.
svn path=/trunk/mcs/; revision=152217
* StreamWriter.cs:
* FileStream.cs: if flushing fails when disposing the stream, make
sure it is closed before throwing the exception. Fixes bug #579146.
svn path=/trunk/mcs/; revision=151761
* net_2_1_raw_corlib.dll.sources: added System.IO/SearchOption.cs
to fix the build.
2010-01-26 Marek Habersack <[email protected]>
* SearchOption.cs: included in 2.1 build as internal to fix
the build.
svn path=/trunk/mcs/; revision=150207
* StreamReader.cs: When detecting the encoding we usually check the
four first bytes looking for either UTF32 or UTF8 BOM, since they share
the first two bytes, but if we happen to have less than 4 bytes at
detection time, just check for Unicode and use it as the current
encoding - this is exactly what .Net does, and it is specially visible
with NetworkStream.
Fixes#534137.
svn path=/trunk/mcs/; revision=150090
* BufferedStream.cs: Patch by Tom Philpot to optimise ReadByte
* and
WriteByte significantly by making them fulfill their request by
directly reading from the buffer.
svn path=/trunk/mcs/; revision=149799
* MemoryStream.cs: Don't clear the bytes beyond Length when shrinking
it. Instead just save the related information for it and do it when
Length grows and touchs that dirty region. Refactor the code where
needed to avoid duplication as well.
Fixes#327053.
svn path=/trunk/mcs/; revision=148995
* Directory.cs: Added new IEnumerable methods to Directory.
* MonoIO.cs: Surface a high level FindFirst/FindNext API to
implement the various enumerable APIs.
svn path=/trunk/mcs/; revision=146698
* UnmanagedMemoryStream.cs: Move the CLS attribute to the methods
that are unsafe.
* Path.cs (Combine):e Fix implementation to follow docs (we need
to reset the path if any of the combined paths is rooted), and add a
couple of overloads;
* FileStream.cs (Flush/flushToDisk): Implement.
* Stream.cs (CopyTo): Implement.
svn path=/trunk/mcs/; revision=145640
* FileStream.cs: Check the return value of MonoIO.Write and handle
short-writes as those can happen when a FileStream is used on top
of a pipe on Unix.
Fixes bug: #531613, this should be backported to 2-4 and 2-6 after
some testing.
svn path=/trunk/mcs/; revision=145271
* FileStream.cs: Move code to deal with 'anonymous' filenames
into two methods (returning the path, fullpath or only the
filename). Default Moonlight to anonymous (not only for isolated
storage) unless the coreclr is disable (e.g. smcs)
svn path=/trunk/mcs/; revision=144945
2009-10-15 Sebastien Pouliot <[email protected]>
* UnmanagedMemoryStreamTest.cs: Add more test cases to cover all
validations
In System.IO:
2009-10-15 Sebastien Pouliot <[email protected]>
* UnmanagedMemoryStream.cs: Fix some and add missing validations
svn path=/trunk/mcs/; revision=144226
* Directory.cs: Don't expose SearchOption in NET_2_1
* DirectoryInfo.cs: Don't expose SearchOption in NET_2_1
* MonoIO.cs: Don't throw a DriveNotFoundException under NET_2_1 -
an IOExpection will be thrown (like the 1.x profile)
svn path=/trunk/mcs/; revision=142479