Skip to content

Commit 6b5db7e

Browse files
committed
πŸ› Bug fixes
- Fix: "Open file with external app doesn't work when image path has spaces" (#55) - Fix: The type options button is hidden after the "Unable to open file" error
1 parent e433e93 commit 6b5db7e

23 files changed

+16
-8
lines changed
18 KB
Binary file not shown.

β€Žquick-picture-viewer/MainForm.csβ€Ž

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ private void openFile(string path)
351351
{
352352
try
353353
{
354-
showTypeOpsButton(false);
354+
bool showTypeOps = false;
355355
string ext = Path.GetExtension(path);
356356
if (ext == ".webp")
357357
{
@@ -376,6 +376,7 @@ private void openFile(string path)
376376
{
377377
case SvgWrapper.Error.NoError:
378378
openImage(bmp, Path.GetDirectoryName(path), Path.GetFileName(path));
379+
showTypeOps = true;
379380
showTypeOpsButton(true, SvgWrapper.TypeName);
380381
break;
381382
case SvgWrapper.Error.UnableToOpen:
@@ -442,6 +443,8 @@ private void openFile(string path)
442443
}
443444
}
444445
}
446+
447+
if (!showTypeOps) showTypeOpsButton(false);
445448
}
446449
catch
447450
{
@@ -1814,7 +1817,7 @@ private void externalRunBtn_Click(object sender, EventArgs e)
18141817
{
18151818
string ext = "bmp";
18161819
if (currentFile != null) ext = Path.GetExtension(currentFile).Substring(1, Path.GetExtension(currentFile).Length - 1);
1817-
Process.Start(FileAssociation.GetExecFileAssociatedToExtension(ext), Path.Combine(currentFolder, currentFile));
1820+
Process.Start(FileAssociation.GetExecFileAssociatedToExtension(ext), '"' + Path.Combine(currentFolder, currentFile) + '"');
18181821
}
18191822
catch
18201823
{
@@ -1826,7 +1829,7 @@ private void externalFavoriteBtn_Click(object sender, EventArgs e)
18261829
{
18271830
try
18281831
{
1829-
Process.Start(Properties.Settings.Default.FavoriteExternalApp, Path.Combine(currentFolder, currentFile));
1832+
Process.Start(Properties.Settings.Default.FavoriteExternalApp, '"' + Path.Combine(currentFolder, currentFile) + '"');
18301833
}
18311834
catch
18321835
{

β€Žquick-picture-viewer/PluginManForm.csβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using QuickLibrary;
55
using System.IO.Compression;
66
using System.IO;
7-
using Microsoft.VisualBasic.FileIO;
87
using System.Diagnostics;
98

109
namespace quick_picture_viewer
@@ -152,9 +151,9 @@ private void deletePlugin(int numberInList)
152151
imageList1.Images[numberInList].Dispose();
153152

154153
string pluginFolder = Path.Combine(PluginMan.pluginsFolder, codenames[numberInList]);
155-
if (FileSystem.DirectoryExists(pluginFolder))
154+
if (File.Exists(pluginFolder))
156155
{
157-
FileSystem.DeleteDirectory(pluginFolder, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin, UICancelOption.DoNothing);
156+
FileMan.MoveFileOrFolderToRecycleBin(pluginFolder);
158157
}
159158
else
160159
{
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Locale = en-US
2+
CommCheck64 = 82352531
3+
UpdateCheckInterval = -1

β€Žquick-picture-viewer/obj/Debug/build.forceβ€Ž

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dc78ce8b16327ecc0b8262dadf2845a2d3ded8ae
1+
fe8cdf9517504f7981d65c6fd8f3374a3ccc0e0e

0 commit comments

Comments
Β (0)