commit 95ae51851a51b2356f29023346d285a4f48f397c parent b4763e46cf358f1033a8b7353d2ab44c58c227d6 Author: rwa <apollo@rw-net.de> Date: Sat, 6 Oct 2018 19:02:47 +0200 move files to recycle bin implements #8 Diffstat:
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/SilkypixFileMover/FileOperationAPIWrapper.cs b/SilkypixFileMover/FileOperationAPIWrapper.cs @@ -126,7 +126,6 @@ namespace SilkypixFileMover public static bool MoveToRecycleBin(string path) { return Send(path, FileOperationFlags.FOF_NOCONFIRMATION | FileOperationFlags.FOF_NOERRORUI | FileOperationFlags.FOF_SILENT); - } private static bool deleteFile(string path, FileOperationFlags flags) diff --git a/SilkypixFileMover/Helpers/FileHelpers.cs b/SilkypixFileMover/Helpers/FileHelpers.cs @@ -25,7 +25,10 @@ namespace SilkypixFileMover.Helpers { if (Settings.Default.MoveToRecycleBin) { - FileOperationAPIWrapper.MoveToRecycleBin(fileName); + if ( !FileOperationAPIWrapper.MoveToRecycleBin(fileName)) + { + throw new IOException("File could not be deleted."); + } } else { diff --git a/SilkypixFileMover/Properties/AssemblyInfo.cs b/SilkypixFileMover/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ using System; // 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("1.6.0.5")] +[assembly: AssemblyVersion("1.6.1.0")] [assembly: NeutralResourcesLanguage( "de" )] -[assembly: AssemblyFileVersion("1.6.0.5")] +[assembly: AssemblyFileVersion("1.6.1.0")] diff --git a/SilkypixFileMover/SilkypixFileMover.csproj b/SilkypixFileMover/SilkypixFileMover.csproj @@ -38,8 +38,8 @@ <CreateWebPageOnPublish>true</CreateWebPageOnPublish> <WebPage>index.htm</WebPage> <OpenBrowserOnPublish>false</OpenBrowserOnPublish> - <ApplicationRevision>6</ApplicationRevision> - <ApplicationVersion>1.6.0.%2a</ApplicationVersion> + <ApplicationRevision>1</ApplicationRevision> + <ApplicationVersion>1.6.1.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <CreateDesktopShortcut>true</CreateDesktopShortcut> <PublishWizardCompleted>true</PublishWizardCompleted>