@@ -64,7 +64,7 @@ private static ManifestMetadata ReadMetadata(XElement xElement)
64
64
return manifestMetadata ;
65
65
}
66
66
67
- [ SuppressMessage ( "Microsoft.Maintainability" , "CA1502:AvoidExcessiveComplexity" ) ]
67
+ [ SuppressMessage ( "Microsoft.Maintainability" , "CA1502:AvoidExcessiveComplexity" ) ]
68
68
private static void ReadMetadataValue ( ManifestMetadata manifestMetadata , XElement element , HashSet < string > allElements )
69
69
{
70
70
if ( element . Value == null )
@@ -151,10 +151,10 @@ private static void ReadMetadataValue(ManifestMetadata manifestMetadata, XElemen
151
151
break ;
152
152
case "conflicts" :
153
153
manifestMetadata . Conflicts = value ;
154
- break ;
154
+ break ;
155
155
case "softwareDisplayName" :
156
156
manifestMetadata . SoftwareDisplayName = value ;
157
- break ;
157
+ break ;
158
158
case "softwareDisplayVersion" :
159
159
manifestMetadata . SoftwareDisplayVersion = value ;
160
160
break ;
@@ -274,7 +274,7 @@ private static List<ManifestDependencySet> ReadDependencySets(XElement dependenc
274
274
return new List < ManifestDependencySet > ( ) ;
275
275
}
276
276
277
- // Disallow the <dependencies> element to contain both <dependency> and
277
+ // Disallow the <dependencies> element to contain both <dependency> and
278
278
// <group> child elements. Unfortunately, this cannot be enforced by XSD.
279
279
if ( dependenciesElement . ElementsNoNamespace ( "dependency" ) . Any ( ) &&
280
280
dependenciesElement . ElementsNoNamespace ( "group" ) . Any ( ) )
@@ -340,9 +340,17 @@ private static List<ManifestFile> ReadFilesList(XElement xElement)
340
340
string target = file . GetOptionalAttributeValue ( "target" ) . SafeTrim ( ) ;
341
341
string exclude = file . GetOptionalAttributeValue ( "exclude" ) . SafeTrim ( ) ;
342
342
343
- // Multiple sources can be specified by using semi-colon separated values.
343
+ char separator = Path . DirectorySeparatorChar ;
344
+
345
+ // Multiple sources can be specified by using semi-colon separated values.
344
346
files . AddRange ( from source in srcElement . Value . Trim ( ';' ) . Split ( ';' )
345
- select new ManifestFile { Source = source . SafeTrim ( ) , Target = target . SafeTrim ( ) , Exclude = exclude . SafeTrim ( ) } ) ;
347
+ select new ManifestFile
348
+ {
349
+ // Replace directory separator in the file src element to the one that is correct for the OS of the packing system.
350
+ Source = source . SafeTrim ( ) . Replace ( '/' , separator ) . Replace ( '\u005c ' , separator ) ,
351
+ Target = target . SafeTrim ( ) ,
352
+ Exclude = exclude . SafeTrim ( )
353
+ } ) ;
346
354
}
347
355
return files ;
348
356
}
0 commit comments