Skip to content

Commit

Permalink
Fixed mac filepaths due to security issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EX3exp committed Oct 3, 2024
1 parent caebde4 commit a7f1fc3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 27 deletions.
6 changes: 3 additions & 3 deletions Mirivoice.Desktop/appveyor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def write_info_plist():
</dict>
</plist>'''.replace('@@', appcast_ver)

with open("Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.app/Contents/Info.plist", 'w') as f:
with open("Mirivoice.Desktop/osxbuild/MiriVoice.app/Contents/Info.plist", 'w') as f:
f.write(plist)

if sys.platform == 'win32':
Expand Down Expand Up @@ -90,8 +90,8 @@ def write_info_plist():
write_info_plist()
os.system("dotnet restore Mirivoice.Desktop/Mirivoice.Desktop.csproj -r osx-x64")
os.system("dotnet publish Mirivoice.Desktop/Mirivoice.Desktop.csproj -r osx-x64 -c Release -o Mirivoice.Desktop/bin/osx-x64 -p:AssemblyVersion=%s" % (appcast_ver))
os.system("cp -a Mirivoice.Desktop/bin/osx-x64 Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.app")
os.system("ditto -c -k --keepParent Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.app Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.zip")
os.system("cp -a Mirivoice.Desktop/bin/osx-x64/ Mirivoice.Desktop/osxbuild/MiriVoice.app/Contents/MacOS/")
os.system("ditto -c -k --keepParent Mirivoice.Desktop/osxbuild/MiriVoice.app Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.zip")
os.system("git checkout Mirivoice.Desktop/Mirivoice.Desktop.csproj")

write_appcast("macos", "osx-x64", "MiriVoice-osx-x64.zip")
Expand Down
22 changes: 0 additions & 22 deletions Mirivoice.Desktop/build_osx.sh

This file was deleted.

6 changes: 5 additions & 1 deletion Mirivoice/Mirivoice.Core/Managers/MainManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ public static void ExtractSplitZip(string zipFilePath, string extractPath)
}
}

DeleteExtractedZip(zipFilePath);
if (!OS.IsMacOS())
{
DeleteExtractedZip(zipFilePath); // cannot delete asset on MacOS because it is in app bundle
}

}

}
Expand Down
2 changes: 1 addition & 1 deletion Mirivoice/Mirivoice.Core/Managers/PathManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class PathManager
public bool IsInstalled { get; private set; }

public string LogFilePath => Path.Combine(DataPath, "Logs", "log.txt");
public string VoicerPath => Path.Combine(RootPath, "Voicers");
public string VoicerPath => Path.Combine(DataPath, "Voicers");
public string AssetsPath => Path.Combine(RootPath, "Assets");

public PathManager()
Expand Down

0 comments on commit a7f1fc3

Please sign in to comment.