Skip to content

Commit

Permalink
more strict filter on build template copy
Browse files Browse the repository at this point in the history
  • Loading branch information
i-e-b committed May 9, 2013
1 parent 9776c13 commit ed0f8a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PlatformBuild/FileSystem/RealFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,19 @@ private static void DirectoryCopy(string sourceDirName, string destDirName, bool
var files = dir.GetFiles();
foreach (var file in files)
{
var temppath = Path.Combine(destDirName, file.Name);
if (file.Name.ToLowerInvariant() == ".git") continue;
if (file.Attributes.HasFlag(FileAttributes.Hidden)) continue;
file.CopyTo(temppath, true);

var newLocation = Path.Combine(destDirName, file.Name);
file.CopyTo(newLocation, true);
}

if (!copySubDirs) return;
foreach (var subdir in dirs)
{
if (subdir.Name.ToLowerInvariant() == ".git") continue;
if (subdir.Attributes.HasFlag(FileAttributes.Hidden)) continue;

var temppath = Path.Combine(destDirName, subdir.Name);
DirectoryCopy(subdir.FullName, temppath, true);
}
Expand Down

0 comments on commit ed0f8a5

Please sign in to comment.