Skip to content

Commit

Permalink
#18 Fixed omission of setting conversion check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Snow1226 committed Aug 18, 2021
1 parent b60b806 commit 3b1036f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CameraPlus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v6.0.3 Changes
- #18 Fixed omission of setting conversion check.

# v6.0.2 Changes
- Fixed the problem that it cannot be started when cfg data remains in UserData/CameraPlus.
- Fixed an issue where profiles were not loaded immediately after launch when using GottaGoFast.
Expand Down
2 changes: 1 addition & 1 deletion CameraPlus/CameraPlusController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private void Awake()
if (File.Exists(path))
{
RootConfig rootConfig = new RootConfig(path);
if (!File.Exists(backupPath))
if (!Directory.Exists(backupPath))
Directory.CreateDirectory(backupPath);
File.Copy(path, Path.Combine(backupPath, $"{Plugin.Name}.ini"), true);
File.Delete(path);
Expand Down
4 changes: 2 additions & 2 deletions CameraPlus/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.2")]
[assembly: AssemblyFileVersion("6.0.2")]
[assembly: AssemblyVersion("6.0.3")]
[assembly: AssemblyFileVersion("6.0.3")]
5 changes: 4 additions & 1 deletion CameraPlus/Utilities/ConfigConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ internal static void DefaultConfigConverter()
DirectoryInfo dirInfo = new DirectoryInfo(Path.Combine(UnityGame.UserDataPath, Plugin.Name));
foreach (FileInfo fi in dirInfo.GetFiles("*.cfg"))
{
if (!Directory.Exists(Path.GetDirectoryName(backupPath)))
Directory.CreateDirectory(Path.GetDirectoryName(backupPath));

pc = new PreviousConfig(fi.FullName);
cc = PreviousConfigToCameraConfig(pc,
Path.Combine(UnityGame.UserDataPath, Plugin.Name,
$"{fi.Name.Substring(0, fi.Name.Length - fi.Extension.Length)}.json"));
File.Copy(fi.FullName, Path.Combine(UnityGame.UserDataPath, Plugin.Name, "OldProfiles", fi.Name),true);
File.Copy(fi.FullName, Path.Combine(backupPath, fi.Name),true);
File.Delete(fi.FullName);
Logger.log.Notice($"Profile Convert : {fi.Name}");
}
Expand Down
2 changes: 1 addition & 1 deletion CameraPlus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "CameraPlus",
"name": "CameraPlus",
"author": "Various Modders",
"version": "6.0.2",
"version": "6.0.3",
"description": "CameraPlus is a Beat Saber mod that allows for multiple wide FOV cameras with smoothed movement.",
"gameVersion": "1.16.4",
"dependsOn": {
Expand Down

0 comments on commit 3b1036f

Please sign in to comment.