Skip to content

Commit 86a44c8

Browse files
committed
// rename patch
1 parent 11bf5c4 commit 86a44c8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Action/CorpusExplorer.Sdk.Action/LayerRenameAction.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using CorpusExplorer.Sdk.Ecosystem.Model;
55
using CorpusExplorer.Sdk.Helper;
66
using CorpusExplorer.Sdk.Model;
7+
using CorpusExplorer.Sdk.Model.Extension;
78
using CorpusExplorer.Sdk.Utils.DataTableWriter.Abstract;
89

910
namespace CorpusExplorer.Sdk.Action
@@ -17,8 +18,6 @@ public void Execute(Selection selection, string[] args, AbstractTableWriter writ
1718
{
1819
if (args.Length != 3)
1920
return;
20-
21-
selection.LayerRename(args[0], args[1]);
2221

2322
var output = args[2].Split(Splitter.Hashtag, StringSplitOptions.RemoveEmptyEntries);
2423
if (output.Length != 2)
@@ -33,7 +32,10 @@ public void Execute(Selection selection, string[] args, AbstractTableWriter writ
3332
if (!string.IsNullOrWhiteSpace(dir) && !Directory.Exists(dir))
3433
Directory.CreateDirectory(dir);
3534

36-
exporter.Export(selection, path);
35+
var corpus = selection.ToCorpus();
36+
corpus.LayerRename(args[0], args[1]);
37+
38+
exporter.Export(corpus, path);
3739
}
3840
}
3941
}

0 commit comments

Comments
 (0)