Fixed a bug with startfolder and exclude.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@308 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -398,7 +398,10 @@ namespace LocalizationTool
|
||||
|
||||
foreach (XElement n in conf.Elements("assembly"))
|
||||
{
|
||||
List<string> excludes = n.Elements("exclude").Select(c => c.Value).ToList();
|
||||
List<string> excludes = (from x in n.Elements("exclude")
|
||||
let fullpath = System.IO.Path.Combine(System.IO.Path.Combine(Application.StartupPath, cultureReq), x.Value)
|
||||
select fullpath).ToList();
|
||||
|
||||
string assemblyName = n.Attribute("name").Value;
|
||||
string folder = n.Attribute("folder").Value;
|
||||
string @namespace = n.Attribute("namespace") == null ? assemblyName : n.Attribute("namespace").Value;
|
||||
@@ -409,7 +412,7 @@ namespace LocalizationTool
|
||||
if (!System.IO.Directory.Exists(outfolder))
|
||||
System.IO.Directory.CreateDirectory(outfolder);
|
||||
|
||||
ResXCompiler.CompileResxFiles(System.IO.Path.Combine(Application.StartupPath, culture), excludes, @namespace, System.IO.Path.Combine(outfolder, assemblyName + ".resources.dll"), System.IO.Path.GetFullPath(versionassembly), keyfile, culture, productname);
|
||||
ResXCompiler.CompileResxFiles(System.IO.Path.Combine(System.IO.Path.Combine(Application.StartupPath, culture), folder), excludes, @namespace, System.IO.Path.Combine(outfolder, assemblyName + ".resources.dll"), System.IO.Path.GetFullPath(versionassembly), keyfile, culture, productname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
|
||||
namespace LocalizationTool
|
||||
{
|
||||
@@ -71,9 +72,8 @@ namespace LocalizationTool
|
||||
{
|
||||
if (s.ToLower().EndsWith("." + culture.ToLower() + ".resx"))
|
||||
{
|
||||
foreach (string xf in excludeFolders)
|
||||
if (s.ToLower().StartsWith(Duplicati.Library.Core.Utility.AppendDirSeperator(xf).ToLower()))
|
||||
continue;
|
||||
if (excludeFolders.Any(xf => s.ToLower().StartsWith(Duplicati.Library.Core.Utility.AppendDirSeperator(xf).ToLower())))
|
||||
continue;
|
||||
|
||||
string resname = System.IO.Path.ChangeExtension(s, ".resources");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user