From d0844bfc70d830e7b8827e86501b6754215c3107 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 23 Jun 2022 13:59:21 +0100 Subject: [PATCH] [misc] minor update to pollock * Also reinstate CodeQL since github/codeql-action#850 is supposed to be fixed. * Also fix a false Coverity warning. --- .github/workflows/{codeql.nope => codeql.yml} | 7 +++---- res/loc/pollock/Pollock.cs | 18 +++++++++++++----- res/loc/pollock/Pollock.csproj | 6 +++++- res/loc/pollock/app.config | 3 +++ src/rufus.c | 1 + src/rufus.rc | 10 +++++----- 6 files changed, 30 insertions(+), 15 deletions(-) rename .github/workflows/{codeql.nope => codeql.yml} (78%) create mode 100644 res/loc/pollock/app.config diff --git a/.github/workflows/codeql.nope b/.github/workflows/codeql.yml similarity index 78% rename from .github/workflows/codeql.nope rename to .github/workflows/codeql.yml index 2939dae2..b20a1b00 100644 --- a/.github/workflows/codeql.nope +++ b/.github/workflows/codeql.yml @@ -1,4 +1,3 @@ -# Disabled on account of https://github.com/github/codeql-action/issues/850 name: "CodeQL" on: @@ -21,10 +20,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: cpp @@ -37,4 +36,4 @@ jobs: run: msbuild ${{env.SOLUTION_FILE_PATH}} /m /p:Configuration=${{ env.BUILD_CONFIGURATION}},Platform=${{ env.TARGET_PLATFORM }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/res/loc/pollock/Pollock.cs b/res/loc/pollock/Pollock.cs index f892588a..fe72806a 100644 --- a/res/loc/pollock/Pollock.cs +++ b/res/loc/pollock/Pollock.cs @@ -1,7 +1,7 @@ /* * Rufus: The Reliable USB Formatting Utility * Poedit <-> rufus.loc conversion utility - * Copyright © 2018-2019 Pete Batard + * Copyright © 2018-2022 Pete Batard * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,9 +41,9 @@ using System.Windows.Forms; [assembly: AssemblyDescription("Poedit ↔ Rufus loc conversion utility")] [assembly: AssemblyCompany("Akeo Consulting")] [assembly: AssemblyProduct("Pollock")] -[assembly: AssemblyCopyright("Copyright © 2018 Pete Batard ")] +[assembly: AssemblyCopyright("Copyright © 2018-2022 Pete Batard ")] [assembly: AssemblyTrademark("GNU GPLv3")] -[assembly: AssemblyVersion("1.3.*")] +[assembly: AssemblyVersion("1.4.*")] namespace pollock { @@ -266,8 +266,16 @@ namespace pollock } lang.sections[section_name].Add(new Message(parts[1], parts[2])); // We also maintain global list of Id -> str for convenience - lang.id_to_str.Add(new Id(section_name, (parts[1])), parts[2]); - last_key = parts[1]; + try + { + lang.id_to_str.Add(new Id(section_name, (parts[1])), parts[2]); + } + catch (Exception e) + { + Console.WriteLine($"Error for {parts[1]}: " + e.Message); + continue; + } + last_key = parts[1]; if (comment != null) { id = new Id(section_name, last_key); diff --git a/res/loc/pollock/Pollock.csproj b/res/loc/pollock/Pollock.csproj index 5e88229d..ab2e74c0 100644 --- a/res/loc/pollock/Pollock.csproj +++ b/res/loc/pollock/Pollock.csproj @@ -8,9 +8,10 @@ Exe pollock pollock - v4.6 + v4.8 512 true + AnyCPU @@ -51,6 +52,9 @@ + + + diff --git a/res/loc/pollock/app.config b/res/loc/pollock/app.config new file mode 100644 index 00000000..3e0e37cf --- /dev/null +++ b/res/loc/pollock/app.config @@ -0,0 +1,3 @@ + + + diff --git a/src/rufus.c b/src/rufus.c index f1c74a90..eb5ea313 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -1272,6 +1272,7 @@ static char* CreateUnattendXml(int arch, int mask) if (arch < ARCH_X86_32 || arch >= ARCH_ARM_64 || mask == 0) return NULL; arch--; + // coverity[swapped_arguments] if (GetTempFileNameU(temp_dir, APPLICATION_NAME, 0, path) == 0) return NULL; fd = fopen(path, "w"); diff --git a/src/rufus.rc b/src/rufus.rc index 9a0b5c51..6867e490 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.19.1900" +CAPTION "Rufus 3.19.1901" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,19,1900,0 - PRODUCTVERSION 3,19,1900,0 + FILEVERSION 3,19,1901,0 + PRODUCTVERSION 3,19,1901,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.19.1900" + VALUE "FileVersion", "3.19.1901" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.19.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.19.1900" + VALUE "ProductVersion", "3.19.1901" END END BLOCK "VarFileInfo"