Commit Graph
1355 Commits
Author SHA1 Message Date
Eric StJohn 25930e9101 Validate member attributes (dotnet/corefx#42427)
* Fix APICompat issues for member attributes

* Addressing more member attribute diffs

* Fix SQLClient build


Commit migrated from https://github.com/dotnet/corefx/commit/33d0499898434aa2d57e8326317e3d6f6c6401ac
2019-11-11 18:24:28 +00:00
Jacob Lalonde f576bd51a9 Directory move fix (dotnet/corefx#40570)
* Fix to support case-insensitive directory moving/renaming

* More tests for other directories

* Include throwing win32 exp upon directory already existing

* Added ) that I dropped in previous rebase

* Directory get with pattern to check for case sensitivity

* Error message fix

* Rework to support multiple edge cases

* Rework to only support moving to the same directory case insentivity

* Handle situations for case-sensitive file systems

* Test changes

* Stopped modifying environment's current directory

* Cleanup, and tests for drive differences

* Only set route to lower, but only only compare roots ordinally

* Add additional if to check if any directory with that name exists

* Edit to what path to use

* Use destination path.

* Rework file directory scan

* Make utility function due to Any() with empty returning true

* Get the full path before getting the filename

* Check if the directory name is null or empty

* Removed extra line

* Now Defering to the OS for if the directory already exists

* Remove extra semi-colon

* Test Edit

* Comment edit

* Actually test the functionality the test is built for

* Remove platform specific tests and make them platform agnostic

* Target only OSX

* Target all platforms other than linux itself

* Changed how we detect case variants

* Remove unix specific test

* Convert OSX test into no-op test

* Code review feedback and additional tests

* Case-Sensitive file systems specific tests

* Fix to not include osx with other unixes

* Removed a ,


Commit migrated from https://github.com/dotnet/corefx/commit/e9ce2f734698ab5bf13f947c281fa4bec67b0216
2019-11-06 15:30:38 -08:00
Roman Marusyk 25a6514dc0 Consolidate .netcoreapp.cs test files in System.IO.* (dotnet/corefx#42329)
* Consolidate .netcoreapp.cs files because System.IO.* projects is no longer cross-compiled



Commit migrated from https://github.com/dotnet/corefx/commit/1499cbb3e319ec733c09202fd2501292c1d3fe3b
2019-11-03 15:31:21 -08:00
Filip Navara 02ba75ad0f Use clonefile for CopyFile, if available (dotnet/corefx#37583)
* Rework SystemNative_CopyFile to use paths instead of file descriptors

Use clonefile for CopyFile, if available

* Bail out in SystemNative_CopyFile if access fails. We don't want to proceed if the destination file is read-only.

* Handle a race condition where clonefile can result in EEXIST error

* Update comment about fcopyfile

* Update PathInternal.TrimEndingDirectorySeparator to Path.TrimEndingDirectorySeparator

* Add missing close(outFd) call

* Remove unnecessary ! operator

* Save errno around close(outFd) calls

* access already sets EACCESS errno, just keep it

* Remove fcopyfile support

* Open destination file with O_CLOEXEC

* Return correct error code for source == destination

* Rearrange error handling a bit

* Remove forgotten HAVE_FCOPYFILE


Commit migrated from https://github.com/dotnet/corefx/commit/5f45a8d5aa116d688f92952a1de72abd8b30f1a7
2019-11-01 12:22:48 -04:00
Carlos Sanchez Lopez 70e81317e7 Add file creation method that takes an ACL (dotnet/corefx#42099)
Approved API Proposal: dotnet/corefx#41614
Related change for directory creation method that takes an ACL: dotnet/corefx#41834 -merged and ported to 3.1 Prev2

Description
We have extension methods in System.IO.FileSystem.AclExtensions that let the user get and set ACLs for existing files, but we do not have methods that create files with predefined ACLs.
.NET ACL (Access Control List) support is Windows specific. This change will reside inside the System.IO.FileSystem.AccessControl assembly.

Customer impact
Before this change, customers had to create a file or filestream, then set its ACLs. This presents a few problems:

Potential security hole as files can be accessed between creation and modification.
Porting difficulties as there isn't a 1-1 API replacement
Stability issues with background processes (file filters) can prevent modifying ACLs right after creation (typically surfaces as a security exception).
This change addresses those problems by adding a new extension method that allows creating a file and ensuring the provided ACLs are set during creation.
This change is expected to be backported to 3.1.

Commit migrated from https://github.com/dotnet/corefx/commit/508cbc4f1021e260b52981b8510cc5a5881441d3
2019-10-29 15:48:49 -07:00
Carlos Sanchez Lopez bdb751bf52 Add directory creation method that takes an ACL (dotnet/corefx#41834)
* First commit

* Fix OperationCanceledException dependency error, revert nullable indication

* Only Directory files

* Unit tests verifications

* Split FileSystem.Windows into two additional files instead of one. Fix pinning.

* Remove dead comment, add actual UT verifications

* User WellKnownSidType

* Make method unsafe, nit comments addressed.

* Remove irrelevant comment

* Add additional exceptions to triple slash

* Add unit tests for additional exceptions

* Remove FileSystem.cs, it has one obsolete method. Replace all calls of that removed method.

* Second pass on required strings.resx resources

* Remove unused dependency cs files

* Move shared files to Common

* Add the missing braces

* Add nulcheck for this argument, add exception, document exception in triple slash, add unit test.

* Fix netstandard CI build failure

* Fix Microsoft.IO.Redist build issue with NetStandard

* Remove unnecessary assert in ut

* Fix build problem in Windows Packaging All Configurations x64_Debug, System.Runtime needs to be included to recognize NotNullIfNotNullAttribute, consumed in Path.Internal.cs

* Additional file splitting and dependency addition to fix netstandard/netfx build problems

* Fix netstandard and netcoreapp build issues

* Remove unused file

* nit cleaning

* Minimal unit tests

* Remove unused unit test code and spacing fix

* Add full framework condition to unit test

* Additional fix for full framework


Commit migrated from https://github.com/dotnet/corefx/commit/5ed2e98718700ba37ed95c34ee04960b5aba1aa0
2019-10-22 19:42:48 -07:00
Anton Landor 6adfa2dbee System.IO.FileSystem.MoveFile(...) will now delete source file after copying it to its destination when moving files over file systems. (dotnet/corefx#41767)
Commit migrated from https://github.com/dotnet/corefx/commit/fd752586114139c6f42a44b86c9afddd1a128df4
2019-10-22 15:04:08 -04:00
Carlos Sanchez Lopez 71a98437b8 Unit tests to verify value returned by DirectoryInfo.Parent.ToString, both in CoreFX and in Framework. (dotnet/corefx#41452)
Commit migrated from https://github.com/dotnet/corefx/commit/f7081cf3bac10352f4a3ac57aa4b5c0963d33e77
2019-10-22 14:44:29 -04:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Stephen Toub 7ff3a1100a Reduce RemoteInvoke usage in tests (dotnet/corefx#41741)
Many of our RemoteInvokes are there purely because of needing to change the current thread culture but on UAP that actually impacting the whole process.  Until that's addressed, we can at least avoid the RemoteInvoke on all platforms other than UAP. There are also some RemoteInvokes that can be avoided by just serializing all of the (small number of) tests in a test assembly. And there's some additional cleanup to be done as well around not explicitly returning an exit code unless required.

This helps measurably with test performance.  Consider the System.ComponentModel.Annotations test suite.  On my machine, prior to these changes, it took ~25 seconds; after these changes, it takes ~0.3. It helps even more when running against a checked runtime, where all of our test costs are magnified.  With a checked runtime, prior to these changes, it takes ~196 seconds; after these changes, it takes ~2.5 seconds.  This should help measurably with CI time in coreclr.

Commit migrated from https://github.com/dotnet/corefx/commit/cd18bafbabf7fe47601f6f790d157409034a2477
2019-10-15 12:09:06 -04:00
Jan Kotas b6882078d7 Ignore ERROR_NOT_FOUND in File.Encrypt test (dotnet/corefx#41604)
Makes the test pass when EFS (Encrypted File System) is not available.

I have also fixed the interop definition for Encrypt/DecryptFile P/Invokes while I was on it.

Fixes dotnet/corefx#39211

Commit migrated from https://github.com/dotnet/corefx/commit/8c8bf07d52389d8a2948460d4f7e0dba112c20a0
2019-10-07 16:10:21 -07:00
Sylvain 10d02ead0e FileSystem.Unix.File.Move uses "rename" in more cases (dotnet/corefx#40611)
* FileSystem.Unix.File.Move use rename in more cases, avoid link/copy when possible, improve performance on file systems that do not support hard links, such as FAT

* Adapt Unit Tests for accounting FileSystemWatcher events fired by FileSystem.Unix.File.Move implementation that use rename in more cases, avoiding link/copy when possible


Commit migrated from https://github.com/dotnet/corefx/commit/89b087ba5548338bb604db4e1cca0e42f8273e2b
2019-10-07 13:50:47 -07:00
Stephen Toub 95022c31b5 Expose, test, and use ExceptionDispatchInfo.SetCurrentStackTrace
Commit migrated from https://github.com/dotnet/corefx/commit/615990343a9400e46122debf48a5fb08ec452787
2019-10-05 17:07:51 -04:00
Tomas Weinfurt db671a853e invalidate state when directory is created (dotnet/corefx#40677)
Commit migrated from https://github.com/dotnet/corefx/commit/a3bf1eaff8819262e9308a94a59277df95fed6b7
2019-09-19 10:38:41 -07:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Stephen Toub 4fc5d8971d Contribute to IDE0055 (fix formatting)
Commit migrated from https://github.com/dotnet/corefx/commit/b49a8a9be1d53cd9e50cb68fd8540be25c65d433
2019-08-24 07:47:35 -04:00
Stephen Toub 7bdae2162f Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.

Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.


Commit migrated from https://github.com/dotnet/corefx/commit/93285e4511a9656a30b92b8b6a9088608aac40e0
2019-08-24 07:47:35 -04:00
Stephen Toub 9885a60658 Fix IDE0066 across corefx (dotnet/corefx#40288)
* Fix IDE0066 across corefx

"Fix all", but then manual tweaking to accommodate places the rule doesn't work quite right.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/f71a5a1d88214a9e2c26ff2ff8bcfb1017aa6713
2019-08-16 11:24:54 -04:00
Stephen Toub cae3309c0a Fix non-ASCII characters across corefx (dotnet/corefx#40318)
* Fix several non-visible characters in test files

* Replace Unicode surrogate pairs with escaped hex values

* Fix non-ASCII characters in most C# files


Commit migrated from https://github.com/dotnet/corefx/commit/027eb8e19c3498cc2c656931c3b879f5ddb63b0d
2019-08-15 08:17:46 -04:00
Stephen Toub 9548bea38a Make many fields readonly or const across corefx (dotnet/corefx#40298)
* Make many fields readonly or const

* Address PR feedback

- Updated asn.xslt
- Regenerated .xml.cs files


Commit migrated from https://github.com/dotnet/corefx/commit/0cc22ccba707d7552159363d586262fa9c4e8a2a
2019-08-14 14:19:30 -04:00
Stephen Toub 6a988c7d03 Enable StyleCop rules 1205, 1411, 1026, and 1000 (dotnet/corefx#40254)
* Fix StyleCop warning SA1411 (attribute ctor shouldn't use unnecessary parens)

* Fix StyleCop warning SA1026 (new[] spacing)

* Fix StyleCop warning SA1000 (consistent spacing around if, for, switch, etc.)

* Fix StyleCop warning SA1205 (partial elements should declare an access modifier)


Commit migrated from https://github.com/dotnet/corefx/commit/0c4c234a918254d569ffb0f6a607f98193608646
2019-08-12 22:45:34 +02:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub c8df52dd02 Re-enable xunit warning 1026 (unused theory arguments) (dotnet/corefx#40079)
* Re-enable xunit warning 1026 (unused theory arguments)

Some of these were addressed by explicitly discarding theory arguments, generally in cases where either a) the argument was being used as a description to aid in debugging failures, or b) the argument was part of a member data that was used by some theories and not by others all sharing the same member data.

However, there are quite a few legitimate bugs being fixed here, enough that highlights it's worthwhile to have the rule enabled.  Some are cases where the argument was supposed to be used but wasn't.  Some are cases where the argument isn't used at all, and in many cases where we end up running the same test over and over and wasting cycles.  Some are cases where we're unnecessarily including irrelevant inputs to the tests and making the input data more complicated than it needs to be.  Etc.

(Along the way, I also fixed some cases where VS was warning about lambdas being used instead of local functions, and in cases where I agreed I fixed them, via auto-fixers.)

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/daf93ee0e5e5233141eb762c64b6049cfd7d123e
2019-08-07 08:00:27 +02:00
Egor Bogatov 0eec9e1c25 Disable some tests on Mono (dotnet/corefx#40065)
Commit migrated from https://github.com/dotnet/corefx/commit/f80422efb7614106d8c8a418d3bfd4ec98e75b38
2019-08-06 13:18:03 -07:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Stephen Toub 13fc8895db Re-enable xunit warning 1010 (dotnet/corefx#39846)
Commit migrated from https://github.com/dotnet/corefx/commit/e36291288fc182e94a919f45e61a8924f953c3cd
2019-07-28 22:34:44 -04:00
Stephen Toub bf9054c38c Re-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)
Commit migrated from https://github.com/dotnet/corefx/commit/47d96f89df41ce18d3ba77b38007ec68f7f66fc6
2019-07-25 10:45:20 +02:00
Ahson Khan 2ea4e4f134 Update dummy fields within the ref by auto-generating them from the source assembly. (dotnet/corefx#39687)
* Update dummy fields within the ref by auto-generating them from the
source assembly.

* Address feedback.


Commit migrated from https://github.com/dotnet/corefx/commit/c50b758727a041aec2dc959ee5ca2df5614a3c16
2019-07-24 06:28:07 +00:00
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04:00
Stephen Toub 51727a6ef6 Fix ordering of visibility and abstract/virtual/override (dotnet/corefx#39590)
To conform to expected style across corefx.

Commit migrated from https://github.com/dotnet/corefx/commit/b95ad3c0f9066fa426754bd6e3379fbaca24834e
2019-07-18 14:21:08 -04:00
Jeremy Kuhne d336918379 Don't recheck for attributes if the path is too long (dotnet/corefx#39299)
One of our existing tests hits this on some machines. There is no point in retrying if the path is too long and we don't want to add it to the assert either.

Fixes dotnet/corefx#39048

Commit migrated from https://github.com/dotnet/corefx/commit/af2e995a851fe0d218b8c9d17e08b0802150b102
2019-07-08 20:05:26 -07:00
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00
Egor Bogatov 21e3f7c298 Hide some tests under IsPreciseGcSupported condition (dotnet/corefx#39176)
Commit migrated from https://github.com/dotnet/corefx/commit/9b75a46f6f716f77bb0e904b1cd4dd13aa83f0b9
2019-07-03 19:53:28 -04:00
Viktor Hofer 0f67ef28f8 Make CoreFx.Private.TestUtilites RID-agnostic (dotnet/corefx#36207)
* Make CoreFx.Private.TestUtilites RID-agnostic

* Add version checks for other distros

https://github.com/dotnet/corefx/commit/dotnet/corefx@4f0d10773ccbb4849b869b6a0a73d5938f1804bd
Porting fix over into PlatformDetection.

* Build test lib in advance for VS support

* Disable pretest in AllConfigurations

Commit migrated from https://github.com/dotnet/corefx/commit/d3d144fad9b600a0fc1ca6fc7d65c247fddd9f04
2019-06-29 21:53:19 +02:00
Dan Moseley efc72cd007 add path to assert (dotnet/corefx#38709)
Commit migrated from https://github.com/dotnet/corefx/commit/adfa9d3fab65929262aa1419289794282de95b44
2019-06-21 10:04:56 -07:00
Carlos Sanchez Lopez 0bbdb43e6c Fix for issue where iterating over directories ending in a dot would unexpectedly throw (dotnet/corefx#38489)
Issue
In Windows, when iterating over the files of a directory whose name ends in a dot, the iteration fails by throwing an unexpected exception, even when using the proper prefix "\\?\" for the full directory path.

Fix
Add a new boolean argument at the end of the enumeration function signatures that will indicate if the passed path is normalized or not. If it is normalized (which only happens when the path is created by us, not by the user), then we can create the handle using that path. If it's not normalized, we attempt to get its full path before creating the handle, which will throw if a full path can't be obtained.

Added a new unit test to verify the fixed behavior and updated some others whose behavior changed with this fix.

Commit migrated from https://github.com/dotnet/corefx/commit/8e95261ef710e0df980a6d46923eb3c0e8b0bc83
2019-06-20 19:58:33 -07:00
Jan Kotas 60d68d983a Improve AssertExtensions.Equal performance for large arrays (dotnet/corefx#38725)
Assert.Equals on arrays boxes each element and then performs a complex
operation to compare each box. This is slow for large arrays, and extremely
slow for large arrays on checked CoreCLR.

Use AssertExtensions.Equal for large arrays in File.Copy tests to make
them reasonably fast on checked CoreCLR.

Commit migrated from https://github.com/dotnet/corefx/commit/c53300f0696c4817bc06a8ef8711a0bb46f362ec
2019-06-20 18:37:04 -07:00
Viktor Hofer 5f98ba6a2b Enable project restore for test projects (dotnet/corefx#38151)
* Factor out repo restore into seperate props/targets

* Use configuration system msbuild sdk

* Remove XUnit.Runtime.depproj

* Remove TargetGroup usages in test projects

* Fix ILLink configuration

The ILLink package contains netcoreapp2.0 assets which are compatible
with netstandard2.0. Removing the old TargetFramework to restore
successfully.

* Remove usages from TargetGroup in Directory.Build.props

* Remove dead net4* configurations

* Change tests.builds to tests.proj sdk proj

* Make externals dir proj an sdk project

* Consume Microsoft.DotNet.CoreFxTesting as an msbuild sdk

* Use runtimeconfig.template.json

* Remove SupplementalTestData

* Map shared framework version to product version

* Stop binplacing tests

* Move some tool depprojs to targets during restore

* Remove dead code

* Use PackageReference instead of RefFromRuntime in test

* Disable using an apphost

* Copy compression testdata manually cause unicode bug

* Remove target batching in optimizationData

* Reference packaging tools from CoreFx.Private.TestUtilities


Commit migrated from https://github.com/dotnet/corefx/commit/c4c1985531cc1f25c805bbc4801b85c98e0dfee0
2019-06-15 21:27:13 +02:00
Viktor Hofer a5d5b91672 Delete dead uapaot code (dotnet/corefx#38330)
* Delete dead uapaot code

Commit migrated from https://github.com/dotnet/corefx/commit/8c2be7893fa585cba9c094c27b69d7c8e0822ef3
2019-06-14 15:12:42 +02:00
Stephen Toub ace68b26f5 Fix calls to functions moved from PathInternal to Path
Commit migrated from https://github.com/dotnet/corefx/commit/b60e3c347d0af66dc7f7788b736be7f5315c3ad1
2019-06-06 23:11:50 -04:00
Jeremy Kuhne 34a08f46b4 Fix deletion tests on Windows 10 1903. (dotnet/corefx#38186)
In the 1903 release of Windows 10 the deletion behavior has changed. Previously, the filename would be reserved until all open handles were closed after being marked for deletion. Now the filename is immediately released.

Commit migrated from https://github.com/dotnet/corefx/commit/a4cf9a480b34a00e11201e932f7152c63b99b85f
2019-06-03 23:17:15 -04:00
Alexis Christoforides 070efd2e59 Use fallbacks when link() fails (dotnet/corefx#36957)
System.IO.Filesystem's MoveFile() and ReplaceFile() use the link() syscall under some conditions to avoid a copy. This fixes two problems with that:

* MoveFile()'s fall-back does not recognize a possible Android error as non-critical, and bails out on the fall-back with an exception. From logs we know that 'strerror_r(android_error)' = 'Permission denied' so the Android error should be EACCES (we already check for EPERM)
* While MoveFile() was using a fall-back, ReplaceFile() wasn't.

Commit migrated from https://github.com/dotnet/corefx/commit/f6aed7b177580ed3953e6e23dccbe2de57850729
2019-06-03 11:04:59 -04:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00
Dávid Kaya fb6763a1c4 Changed File.Copy to throw if destination is a directory on macOS (dotnet/corefx#36713) (dotnet/corefx#37428)
Commit migrated from https://github.com/dotnet/corefx/commit/e21c2b5af100dc5d70ef1777f5de21d0d5a96210
2019-05-03 19:50:13 -07:00
Dan Moseley 651310ae61 Typos etc (dotnet/corefx#37349)
Commit migrated from https://github.com/dotnet/corefx/commit/b57618e6d1caa03c809e343885f06a5b0791b2c2
2019-05-01 21:14:26 -07:00
Jan Kotas e0fdf03bbe Unify WIN32_FIND_DATA (dotnet/corefx#37158)
Commit migrated from https://github.com/dotnet/corefx/commit/51922de496a713568b493e791c60e419042d19b5
2019-04-24 17:06:30 -07:00
Jan Kotas 836b524726 Fix CPINFOEXW definition (dotnet/corefx#37131)
* Fix CPINFOEXW definition

* Unify MAX_PATH definition and switch to use it for GetCPInfoEx


Commit migrated from https://github.com/dotnet/corefx/commit/24efeca2cb7e8a83125ecdbc62c95040fddabdf2
2019-04-24 11:46:42 -04:00
Carlos Sanchez Lopez 24545a60b2 Directory.Move behaves differently on Unix vs. Windows (dotnet/corefx#37121)
* Directory.Move behaves differently on Unix vs. Windows

We will now throw an exception in Unix platforms like in Windows, if the destination path already exists.

* Modifying ExistingDirectory test method that verifies Move overwrite so its called by all platforms.

We already had a test method that tests Move when the destination path exists. I simply removed the platform attribute that restricted it to Windows and renamed the test method so its universal (as opposed to platform specific).

Commit migrated from https://github.com/dotnet/corefx/commit/f9c85c033361ee5bfcf43707dc6d29731f8bc3cb
2019-04-23 13:46:50 -07:00
Tanner Gooding 5a5ed7652a Regenerating reference sources in order to reorder enum fields (dotnet/corefx#37045)
Commit migrated from https://github.com/dotnet/corefx/commit/17382def0f680653870c31af1acf086ac41dcc0b
2019-04-23 13:40:45 -07:00
Hugh Bellamy e07a068d78 Fix LsaOpenPolicy interop definition
* Move Lsa handles to Interop code

* Fix implementation of LsaOpenPolicy

* Move LSA_STRING and LSA_UNICODE_STRING to Advapi32

* Consolidate LSA_UNICODE_STRING and UNICODE_STRING


Commit migrated from https://github.com/dotnet/corefx/commit/f5e2679e76c102aea8218ae290ffb7f4d97e9cc2
2019-04-13 09:52:14 -07:00