HyperVDsc icon indicating copy to clipboard operation
HyperVDsc copied to clipboard

VhdFileDirectory - improvements and fixes to Content files

Open DmitryMashkov-DM opened this issue 6 years ago • 3 comments

Pull Request (PR) description

  1. Added ContentEncoding property to properly support Content files (otherwise they are always written as Unicode) which corrupts some content types like UTF-8 XMLs.
  2. Content files are not tested with ItemHasChanged (this didn't work anyway).
  3. Fixed GetItemToCopy where an undefined DefaultValues array was used instead of DesiredProperties, resulting in a dead code, impacting properties like Force.
  4. After #3 is fixed and the code is finally execuded, it would crash if a file is a Content (without SourcePath).
  5. In SetVHDFile , Copy-Item's ErrorAction is set to Stop. Otherwise, the resource would simply ignore all errors and produce invalid configuration.

This Pull Request (PR) fixes the following issues

None


This change is Reviewable

DmitryMashkov-DM avatar Jan 07 '20 18:01 DmitryMashkov-DM

Codecov Report

Merging #179 into dev will decrease coverage by <1%. The diff coverage is 0%.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #179   +/-   ##
===================================
- Coverage    73%    73%   -1%     
===================================
  Files        11     11           
  Lines      1401   1402    +1     
===================================
  Hits       1035   1035           
- Misses      366    367    +1

codecov[bot] avatar Jan 07 '20 18:01 codecov[bot]

Hi Dmitry, can you please open an issue for this feature so that we have more context? Also, could you add appropriate tests for the new functionality please? Thanks for the contribution!

aromano2 avatar Jan 30 '20 14:01 aromano2

We have renamed the resource, removing 'x', so please rebase this PR.

johlju avatar Jun 08 '22 08:06 johlju