Skip to content

Commit

Permalink
Merge pull request #97 from Unity-Technologies/bugfix/windows-sharing…
Browse files Browse the repository at this point in the history
…-violation

Fix sharing violation when trying to copy streaming assets on windows
  • Loading branch information
BrettKercher authored Jul 9, 2018
2 parents ad50467 + f0b2f27 commit 25e9a39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Editor/AssetBundleBuildTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,9 @@ private static void DirectoryCopy(string sourceDirName, string destDirName)

foreach (string filePath in Directory.GetFiles(sourceDirName, "*.*", SearchOption.AllDirectories))
{
string newFilePath = Path.Combine(Path.GetDirectoryName(filePath).Replace(sourceDirName, destDirName),
Path.GetFileName(filePath));
var fileDirName = Path.GetDirectoryName(filePath).Replace("\\", "/");
var fileName = Path.GetFileName(filePath);
string newFilePath = Path.Combine(fileDirName.Replace(sourceDirName, destDirName), fileName);

File.Copy(filePath, newFilePath, true);
}
Expand Down

0 comments on commit 25e9a39

Please sign in to comment.