Skip to content

Commit a5ccf69

Browse files
committed
[misc] minor update to pollock
* Also reinstate CodeQL since github/codeql-action#850 is supposed to be fixed and add dependabot.yml. * Also fix a false Coverity warning.
1 parent a0d6692 commit a5ccf69

File tree

7 files changed

+36
-15
lines changed

7 files changed

+36
-15
lines changed

.github/workflows/codeql.nope renamed to .github/workflows/codeql.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Disabled on account of https://github.com/github/codeql-action/issues/850
21
name: "CodeQL"
32

43
on:
@@ -21,10 +20,10 @@ jobs:
2120

2221
steps:
2322
- name: Checkout repository
24-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2524

2625
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v1
26+
uses: github/codeql-action/init@v2
2827
with:
2928
languages: cpp
3029

@@ -37,4 +36,4 @@ jobs:
3736
run: msbuild ${{env.SOLUTION_FILE_PATH}} /m /p:Configuration=${{ env.BUILD_CONFIGURATION}},Platform=${{ env.TARGET_PLATFORM }}
3837

3938
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v1
39+
uses: github/codeql-action/analyze@v2

.github/workflows/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

res/loc/pollock/Pollock.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Rufus: The Reliable USB Formatting Utility
33
* Poedit <-> rufus.loc conversion utility
4-
* Copyright © 2018-2019 Pete Batard <[email protected]>
4+
* Copyright © 2018-2022 Pete Batard <[email protected]>
55
*
66
* This program is free software: you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -41,9 +41,9 @@
4141
[assembly: AssemblyDescription("Poedit ↔ Rufus loc conversion utility")]
4242
[assembly: AssemblyCompany("Akeo Consulting")]
4343
[assembly: AssemblyProduct("Pollock")]
44-
[assembly: AssemblyCopyright("Copyright © 2018 Pete Batard <[email protected]>")]
44+
[assembly: AssemblyCopyright("Copyright © 2018-2022 Pete Batard <[email protected]>")]
4545
[assembly: AssemblyTrademark("GNU GPLv3")]
46-
[assembly: AssemblyVersion("1.3.*")]
46+
[assembly: AssemblyVersion("1.4.*")]
4747

4848
namespace pollock
4949
{
@@ -266,8 +266,16 @@ static List<Language> ParseLocFile(string file, string select_id = null)
266266
}
267267
lang.sections[section_name].Add(new Message(parts[1], parts[2]));
268268
// We also maintain global list of Id -> str for convenience
269-
lang.id_to_str.Add(new Id(section_name, (parts[1])), parts[2]);
270-
last_key = parts[1];
269+
try
270+
{
271+
lang.id_to_str.Add(new Id(section_name, (parts[1])), parts[2]);
272+
}
273+
catch (Exception e)
274+
{
275+
Console.WriteLine($"Error for {parts[1]}: " + e.Message);
276+
continue;
277+
}
278+
last_key = parts[1];
271279
if (comment != null)
272280
{
273281
id = new Id(section_name, last_key);

res/loc/pollock/Pollock.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
<OutputType>Exe</OutputType>
99
<RootNamespace>pollock</RootNamespace>
1010
<AssemblyName>pollock</AssemblyName>
11-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -51,6 +52,9 @@
5152
<ItemGroup>
5253
<Content Include="pollock.ico" />
5354
</ItemGroup>
55+
<ItemGroup>
56+
<None Include="app.config" />
57+
</ItemGroup>
5458
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5559
<Target Name="PostBuildMacros">
5660
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">

res/loc/pollock/app.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

src/rufus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,7 @@ static char* CreateUnattendXml(int arch, int mask)
12721272
if (arch < ARCH_X86_32 || arch >= ARCH_ARM_64 || mask == 0)
12731273
return NULL;
12741274
arch--;
1275+
// coverity[swapped_arguments]
12751276
if (GetTempFileNameU(temp_dir, APPLICATION_NAME, 0, path) == 0)
12761277
return NULL;
12771278
fd = fopen(path, "w");

src/rufus.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
3333
IDD_DIALOG DIALOGEX 12, 12, 232, 326
3434
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
3535
EXSTYLE WS_EX_ACCEPTFILES
36-
CAPTION "Rufus 3.19.1900"
36+
CAPTION "Rufus 3.19.1901"
3737
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
3838
BEGIN
3939
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@@ -395,8 +395,8 @@ END
395395
//
396396

397397
VS_VERSION_INFO VERSIONINFO
398-
FILEVERSION 3,19,1900,0
399-
PRODUCTVERSION 3,19,1900,0
398+
FILEVERSION 3,19,1901,0
399+
PRODUCTVERSION 3,19,1901,0
400400
FILEFLAGSMASK 0x3fL
401401
#ifdef _DEBUG
402402
FILEFLAGS 0x1L
@@ -414,13 +414,13 @@ BEGIN
414414
VALUE "Comments", "https://rufus.ie"
415415
VALUE "CompanyName", "Akeo Consulting"
416416
VALUE "FileDescription", "Rufus"
417-
VALUE "FileVersion", "3.19.1900"
417+
VALUE "FileVersion", "3.19.1901"
418418
VALUE "InternalName", "Rufus"
419419
VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)"
420420
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
421421
VALUE "OriginalFilename", "rufus-3.19.exe"
422422
VALUE "ProductName", "Rufus"
423-
VALUE "ProductVersion", "3.19.1900"
423+
VALUE "ProductVersion", "3.19.1901"
424424
END
425425
END
426426
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)