Skip to content

Commit

Permalink
Only use extension when it is resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudioESSilva committed Jun 5, 2018
1 parent 3e87c41 commit 498942e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ function Write-RsCatalogItem

if ($itemType -eq 'Resource')
{
#If it is a resource we need to save the extension so the file can be recognized
$itemName = $item.Name
$property.Name = 'MimeType'
if ($item.Extension -eq ".png")
{
Expand All @@ -233,7 +235,7 @@ function Write-RsCatalogItem
$warnings = $null
try
{
$Proxy.CreateCatalogItem($itemType, $item.Name, $RsFolder, $Overwrite, $bytes, $additionalProperties, [ref]$warnings) | Out-Null
$Proxy.CreateCatalogItem($itemType, $itemName, $RsFolder, $Overwrite, $bytes, $additionalProperties, [ref]$warnings) | Out-Null
if ($warnings)
{
foreach ($warn in $warnings)
Expand Down

0 comments on commit 498942e

Please sign in to comment.