Skip to content

Commit bcf046f

Browse files
committed
fix move method call only restricted to within the same drive
1 parent 1ec5023 commit bcf046f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
using Flow.Launcher.Infrastructure;
22
using Flow.Launcher.Plugin.SharedCommands;
33
using System;
4-
using System.Diagnostics;
54
using System.IO;
65
using System.Linq;
7-
using System.Runtime.CompilerServices;
86
using System.Windows;
97

108
namespace Flow.Launcher.Plugin.Explorer.Search

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Flow.Launcher.Infrastructure.Logger;
44
using Flow.Launcher.Infrastructure.UserSettings;
55
using Flow.Launcher.Plugin.PluginsManager.Models;
6+
using Flow.Launcher.Plugin.SharedCommands;
67
using System;
78
using System.Collections.Generic;
89
using System.IO;
@@ -327,7 +328,9 @@ private void Install(UserPlugin plugin, string downloadedFilePath)
327328

328329
var zipFilePath = Path.Combine(tempFolderPath, Path.GetFileName(downloadedFilePath));
329330

330-
File.Move(downloadedFilePath, zipFilePath);
331+
File.Copy(downloadedFilePath, zipFilePath);
332+
333+
File.Delete(downloadedFilePath);
331334

332335
Utilities.UnZip(zipFilePath, tempFolderPluginPath, true);
333336

@@ -345,7 +348,9 @@ private void Install(UserPlugin plugin, string downloadedFilePath)
345348

346349
string newPluginPath = Path.Combine(DataLocation.PluginsDirectory, $"{plugin.Name}-{plugin.Version}");
347350

348-
Directory.Move(pluginFolderPath, newPluginPath);
351+
FilesFolders.CopyAll(pluginFolderPath, newPluginPath);
352+
353+
Directory.Delete(pluginFolderPath, true);
349354
}
350355

351356
internal List<Result> RequestUninstall(string search)

Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Name": "Plugins Manager",
77
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
88
"Author": "Jeremy Wu",
9-
"Version": "1.6.1",
9+
"Version": "1.6.2",
1010
"Language": "csharp",
1111
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1212
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",

0 commit comments

Comments
 (0)