Skip to content

Commit

Permalink
v1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
user413 committed Apr 1, 2023
1 parent 3d77267 commit 6ed5d31
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 2 deletions.
14 changes: 13 additions & 1 deletion BackupHelper/BackupHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Copyright>Copyright © Nain 2023</Copyright>
<FileVersion></FileVersion>
<ApplicationIcon>Resources\backup_helper_icon.ico</ApplicationIcon>
<Version>1.5.0</Version>
<Version>1.5.1</Version>
<Authors>Nain</Authors>
<Title>BackupHelper</Title>
<Description>Small .NET 7 app to facilitate backup of files and directories with advanced settings and binary comparison. These settings are saved into profiles.</Description>
Expand Down Expand Up @@ -45,6 +45,11 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
Expand All @@ -54,4 +59,11 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>

</Project>
12 changes: 11 additions & 1 deletion BackupHelper/Forms/FormOptionsMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,16 @@ private void ButtonExecute_Click(object sender, EventArgs args)
}

List<Options> options = Options.OrderBy(o => o.ListViewIndex).Select(o => o.Clone()).ToList();

//-- Expanding environment variables
foreach (Options o in options)
{
if (!o.FilterFilesAndExts) o.FilteredFileNamesAndExtensions.Clear(); //-- Names must be ignored
else o.FilteredFileNamesAndExtensions = o.FilteredFileNamesAndExtensions.Select(f => Environment.ExpandEnvironmentVariables(f)).ToList();

if (!o.FilterDirectories) o.FilteredDirectories.Clear();
else o.FilteredDirectories = o.FilteredDirectories.Select(d => Environment.ExpandEnvironmentVariables(d)).ToList();

o.SourcePath = Environment.ExpandEnvironmentVariables(o.SourcePath);
o.DestinyPath = Environment.ExpandEnvironmentVariables(o.DestinyPath);
}
Expand Down Expand Up @@ -528,7 +534,11 @@ private void OpenFolder(string path)
{
try
{
System.Diagnostics.Process.Start(path);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = path,
UseShellExecute = true
});
}
catch (Exception e)
{
Expand Down
5 changes: 5 additions & 0 deletions BackupHelper/Program/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,15 @@ static void Main(string[] args)
LogManager.WriteLine($"Working on profile \"{profileName}\"");
profile.Options = DBAccess.ListProfileOptions(profile).OrderBy(o => o.ListViewIndex).ToList();

//-- Expanding environment variables
foreach (Options o in profile.Options)
{
if (!o.FilterFilesAndExts) o.FilteredFileNamesAndExtensions.Clear(); //-- Names must be ignored
else o.FilteredFileNamesAndExtensions = o.FilteredFileNamesAndExtensions.Select(f => Environment.ExpandEnvironmentVariables(f)).ToList();

if (!o.FilterDirectories) o.FilteredDirectories.Clear();
else o.FilteredDirectories = o.FilteredDirectories.Select(d => Environment.ExpandEnvironmentVariables(d)).ToList();

o.SourcePath = Environment.ExpandEnvironmentVariables(o.SourcePath);
o.DestinyPath = Environment.ExpandEnvironmentVariables(o.DestinyPath);
}
Expand Down
26 changes: 26 additions & 0 deletions BackupHelper/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions BackupHelper/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.5.1

New features:
- Support for environment variables in filtered files/extensions/directories

Fixed/altered:
- Opening folders (using windows shell) - fix

## 1.5.0

Database not compatible with previous versions
Expand Down

0 comments on commit 6ed5d31

Please sign in to comment.