Skip to content

Commit

Permalink
maybe fixes chelh#37
Browse files Browse the repository at this point in the history
  • Loading branch information
Andris Kurmis committed Sep 4, 2018
1 parent a67bb92 commit 4129b9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/VBASync/Model/VbaFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ public IList<KeyValuePair<string, Tuple<string, ModuleType>>> GetCodeModules()

public void ReplaceFormControls(string name, VbaFolder source)
{
_so.FileCopy(FindFrxPath(source.FindModulePath(name, ModuleType.Form)),
FindFrxPath(FindModulePath(name, ModuleType.Form)), true);
_so.FileCopy(source.FindFrxPath(name), FindFrxPath(name), true);
}

public void ReplaceTextModule(string name, ModuleType type, VbaFolder source, string fallbackText)
Expand Down Expand Up @@ -130,7 +129,7 @@ protected string FindFrxPath(string name)
}

protected string FindModulePath(string name, ModuleType type)
=> ModuleFilePaths.Find(s => string.Equals(_so.PathGetFileName(s), name + ModuleProcessing.ExtensionFromType(type),
=> ModuleFilePaths.Find(s => string.Equals(_so.PathGetFileName(s), _so.PathGetFileName(name + ModuleProcessing.ExtensionFromType(type)),
StringComparison.OrdinalIgnoreCase));

protected virtual List<string> GetModuleFilePaths() => GetModuleFilePaths(false);
Expand Down

0 comments on commit 4129b9e

Please sign in to comment.