Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfjkl committed Jan 4, 2020
1 parent a4e086b commit 7adf3d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
18 changes: 17 additions & 1 deletion yahb/CopyModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ public List<String> createDirectoryList() {
dir_stack.Push(cfg.sourceDirectory);
}

// add directories from file here to stack
// /s is used, in order to get all
// subdirs
if(cfg.copySubDirectories)
{
foreach( string dir_i in cfg.inputDirectories)
{
dir_stack.Push(dir_i);
}
}

List<string> subdirs;
while (dir_stack.Count > 0)
{
Expand Down Expand Up @@ -110,7 +121,12 @@ public List<String> createDirectoryList() {
dirs.Add(cfg.sourceDirectory);
}
// get directories from provided input file
dirs.AddRange(cfg.inputDirectories);
// but only if /s was not provided (otherwise)
// above stack operation added them incl. subdirs
if (!cfg.copySubDirectories)
{
dirs.AddRange(cfg.inputDirectories);
}

// filter directories according to input given
List<String> dirs_filtered = new List<String>();
Expand Down
6 changes: 3 additions & 3 deletions yahb/ParseCmdLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ public void DisplayVerboseHelp()
Console.WriteLine(" If this options is used, <source-dir> can be");
Console.WriteLine(" omitted. If both <source-dir> and /id:FILENAME");
Console.WriteLine(" are present, all directories will be copied.");
Console.WriteLine(" NOTE that if /s is provided, it will NOT be ");
Console.WriteLine(" applied to the list of input directories, but");
Console.WriteLine(" will be applied to <source-dir>.");
Console.WriteLine(" NOTE that if /s is provided, it will be ");
Console.WriteLine(" applied to the list of input directories, and");
Console.WriteLine(" will also be applied to <source-dir>.");
Console.WriteLine("");
Console.WriteLine(" /list :: do not copy anything, just list all files");
Console.WriteLine("");
Expand Down

0 comments on commit 7adf3d4

Please sign in to comment.