Beispiel #1
0
        private InstallationStatus CopyFile(string targetFile, string destinationPath, GameModification mod)
        {
            if (ModCollisionTracker.HasCopyCollision(mod, targetFile, destinationPath, modifications, out var collision))
            {
                return(HandleCollision(collision));
            }

            if (!File.Exists(targetFile))
            {
                throw new Exception($"Unable to find target path: {targetFile}");
            }

            // Copying files occurs near the start, and should not cause conflicts

            CopyFile_Internal(targetFile, destinationPath, mod);
            return(InstallationStatus.Success);
        }