SIL.FieldWorks.Common.Framework.FwApp.ExpandToFullPath C# (CSharp) Method

ExpandToFullPath() private static method

Expand the internal paths from relative to absolute as needed, since the user doesn't want to move (or copy) them.
private static ExpandToFullPath ( ICmFolder folder, string sOldRootDir, string sNewRootDir ) : void
folder ICmFolder
sOldRootDir string
sNewRootDir string
return void
		private static void ExpandToFullPath(ICmFolder folder,
			string sOldRootDir, string sNewRootDir)
		{
			foreach (var file in folder.FilesOC)
			{
				string sFilepath = file.InternalPath;
				if (!Path.IsPathRooted(sFilepath))
				{
					if (FileUtils.SimilarFileExists(Path.Combine(sOldRootDir, sFilepath)) &&
						!FileUtils.SimilarFileExists(Path.Combine(sNewRootDir, sFilepath)))
					{
						file.InternalPath = Path.Combine(sOldRootDir, sFilepath);
					}
				}
			}
			foreach (var sub in folder.SubFoldersOC)
				ExpandToFullPath(sub, sOldRootDir, sNewRootDir);
		}
		#endregion