Commit Graph
756 Commits
Author SHA1 Message Date
Marek Safar 1242b4b82c [corlib] Enumerate all subdirectories including the first one. Fixes #22857 2014-09-11 11:20:44 +02:00
Marek Safar 336382e2b1 [corlib] corcompare update 2014-08-25 13:12:42 +02:00
Marek Safar b184bbea53 [corlib] Remove heavyweight EndsWith from 1bff9d890f 2014-08-12 08:49:29 +02:00
João Matos 1bff9d890f Fixed Path.GetFullPath to work correctly when the current path is '/'.
Fixes xambug #833.
2014-08-08 19:03:39 +01:00
marcos henrich b124b68759 FileInfo members that rely on System.Security.AccessControl are now inside a conditional block !MOBILE 2014-05-30 16:55:52 +01:00
marcos henrich 77b1aacb9d Removed NET_2_1 conditional blocks from FileInfo. Fixes #19862. 2014-05-28 18:24:16 +01:00
Marek Safar fc5f457120 [corlib] Use invariant culture for GetTempFileName generator 2014-05-08 10:26:29 +02:00
Miguel de Icaza d518bd927a [corlib] Remove stale comments 2014-05-04 17:34:12 -04:00
Miguel de Icaza 040ba8b7e8 [mscorlib] Path: fix GetFullPath (/../bin/bash) to return /bin/bash, not bin/bash, fixes 17083 2014-02-12 13:19:31 -05:00
Marek Safar 5a20d0438a [corlib] Path.Combine with variable arguments length where one is empty should give same result as other Combine overloads 2014-02-05 16:56:03 +01:00
Marek Safar 9bc33d4aae [corlib] Use shared version of utf8 encoding in stream reader 2014-02-05 16:56:02 +01:00
Marek Safar d3b817cbb8 [corlib] Initialize null stream reader 2014-02-04 13:14:33 +01:00
Marek Safar 7db9ee7b47 Merge pull request #876 from knocte/master
Fix very sticky typo in numerous places
2014-01-19 23:41:11 -08:00
Andrés G. Aragoneses 0eb40ad2da Fix very sticky typo in numerous places 2014-01-19 17:51:24 +01:00
Marek Safar 4de39e0eac [corlib] BinaryStream sting reading from custom stream uses correct count. Fixes #15143 2014-01-17 21:59:40 +01:00
Miguel de Icaza a52849e336 Fix inacurrate reference 2013-10-04 15:39:09 -04:00
Marek Safar b52c963187 Pass cancellation token to CopyAsync read block 2013-09-22 19:23:17 +02:00
Marek Safar be2e73c7e8 Correctly reset buffer for nested asynchronous file stream writes. Fixes #12777 2013-07-05 18:47:22 +02:00
TalAloni 155a4799fc Fix for bug 12892 - Path.GetFullPath() may return incorrect relative path under Windows 2013-06-28 11:25:54 +03:00
Rodrigo Kumpera d6fd0cde05 Make sure the behavior between GetFiles and EnumerateFiles are the same regarding symlinks. Fixes BXC #12461
* Directory.cs: Only ignore symlinks when traversing subdirectories. This is the only case that it can result
	in loops.
2013-06-04 18:49:34 -04:00
Jonathan Pryor b1f4d6dfcc [corlib] Don't throw UnauthorizedAccessException from Path.GetTempFileName
The problem is sporadic mdoc test failures on Wrench/OS X:

	Updating: Mono.DocTest.Widget/NestedClass/Double/Triple/Quadruple
	mdoc: System.UnauthorizedAccessException: Access to the path '/var/folders/_g/y9v720_90l914yylrk7m903c0000gn/T/tmp20f71445.tmp' is denied.
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
	  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool,System.IO.FileOptions)
	  at System.IO.Path.GetTempFileName () [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MdocFile.UpdateFile (System.String file, System.Action`1 creator) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDocUpdater.WriteFile (System.String filename, FileMode mode, System.Action`1 action) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDocUpdater.DoUpdateType2 (System.String message, System.Xml.XmlDocument basefile, Mono.Cecil.TypeDefinition type, System.String output, Boolean insertSince) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDocUpdater.DoUpdateType (Mono.Cecil.TypeDefinition type, System.String basepath, System.String dest) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDocUpdater.DoUpdateAssembly (Mono.Cecil.AssemblyDefinition assembly, System.Xml.XmlElement index_types, System.String source, System.String dest, System.Collections.Generic.HashSet`1 goodfiles) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDocUpdater.DoUpdateAssemblies (System.String source, System.String dest) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDocUpdater.Run (IEnumerable`1 args) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDoc.Run (System.String[] args) [0x00000] in <filename unknown>:0
	  at Mono.Documentation.MDoc.Main (System.String[] args) [0x00000] in <filename unknown>:0

I'm not sure why we're getting UnauthorizedAccessException exceptions,
nor do I particularly care; Path.GetTempFileName() should not be
throwing UnauthorizedAccessException; only IOException is documented:

	http://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename.aspx

Update behavior to skip files that generate
UnauthorizedAccessException, and if we swallow short.MaxValue
exceptions wrap the UnauthorizedAccessException in an IOException so
that we conform to documented exceptional behavior.
2013-06-03 16:57:31 -04:00
Radek Doulik 50dacc2e31 revert my 2 last commits
Revert "add System.Net.Http.Formatting to monodroid build"
        Revert "added System.Configuration and System.Security to monodroid build to fix it"

        This reverts commit 85cb9e3176 and
                     commit 6566273367.
2013-05-16 17:29:26 +02:00
Radek Doulik 85cb9e3176 add System.Net.Http.Formatting to monodroid build
- changed the Create method with FileOptions to not depend on FileSecurity
   to avoid dragging System.Security assembly in monodroid build as well
2013-05-15 22:26:32 +02:00
Marek Safar ad8e0f742e StreamWriter async methods cannot call base TextWriter async methods. Fixes #11979 2013-05-09 17:42:28 +02:00
Marek Safar b013a778a2 Remove double verification checks 2013-04-24 10:29:46 +02:00
Marek Safar 768c9e65de Remove redundant culture info from string concatenations 2013-03-05 17:05:31 +01:00
Marek Safar 6c083808ce Use faster/smaller versions for some string comparisons 2013-03-02 18:56:31 +01:00
Rodrigo Kumpera abe9dc6206 Revert "Fix object::GetType when remoting is enabled."
This reverts commit 93e2d1dc48.
2013-03-01 10:54:09 -05:00
Rodrigo Kumpera 93e2d1dc48 Fix object::GetType when remoting is enabled. 2013-03-01 10:52:03 -05:00
TalAloni 19baf6c162 Update Path.cs
Fixed Path.GetDirectoryName() bug when path is in the following form: 'C:filename'
2013-03-01 02:47:07 +02:00
Marek Safar a336b58fdc Use faster versions of string comparers 2013-02-28 15:42:55 +01:00
Marek Safar c132a3c3b0 Fix BinaryReader.ReadChars() no longer recursively calls BinaryReader.Read(). Patch based on tomspilman pull request #559 2013-02-21 12:42:06 +01:00
Marek Safar 8e318f410b Break direct TPL dependency from stream classes 2013-02-16 13:15:52 +01:00
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Rodrigo Kumpera f378e23a3f Since NET_2_1 implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:41:51 -05:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Martin Baulig ff1e088df6 Fix the build. 2013-02-10 12:07:25 +01:00
Marek Safar 21b51635c4 Add missing flags 2013-02-09 13:46:51 +01:00
Petr Onderka 8ee32e8c0e Added missing awaits to StreamWriter 2013-02-06 11:19:11 +01:00
Marek Safar 185743cacd Rewrite of async StreamReader/StreamWritter operations to not fail on subsequent async call. Fixes #9761 2013-02-01 18:29:54 +01:00
Rodrigo Kumpera 089ab9c975 DirectoryInfo should update its internal values when MoveTo is called. Fixes #7653. 2013-01-11 16:23:37 -05:00
Marek Safar c133ae2dc8 Merge pull request #485 from mtausig/master
Bugfix for DirectoryInfo.GetDirectories()
2012-10-29 09:49:43 -07:00
mtausig a67abaf7d3 Fix: Removed wrong increment 2012-10-29 16:50:35 +01:00
mtausig 852718b499 Removed null check of parameter (done in Directory.GetDirectories)
Changed foreach loop to for loop
Added some comments
2012-10-29 13:29:24 +01:00
mtausig 9918be57fe Removed extra-brace 2012-10-29 11:06:14 +01:00
Marek Safar 6194ac1fff Remove unnecessary and incompatible finalizer 2012-10-04 11:53:14 +01:00
Marek Safar 2d12cfaf80 Flush StreamWriter buffer even if underlying stream is kept open. Fixes #7510 2012-10-04 11:53:14 +01:00
Marek Safar 7883a2dafd Clean up some static initializers 2012-10-03 12:19:55 +01:00
Larry Ewing 137a5c40cf Rework exception handling in MemoryStream async methods
Return faulted tasks for runtime errors when using the MemoryStream
Async methods.
2012-09-14 13:27:54 -05:00
Peter Collingbourne b7141524e4 Rewrite implementation of Directory.EnumerateKind
This rewrite fixes three bugs:

 1) Fixes the case where AllDirectories is specified and searchPattern
    is anything other than '*'.  Now, every directory is searched
    recursively, not just those which match the pattern.

 2) Fully solves the issue that commit e09e64b tried to fix.  Now
    the check for hidden files occurs for every file, rather than
    only the first.

 3) Error handling is now performed at calls to both FindFirst and
    FindNext, not just FindFirst.
2012-09-14 03:02:22 +01:00