Skip to content

Commit f2573c8

Browse files
authored
Merge pull request #41 from GalaxyPay/dev
fix: move data directory cross-drive
2 parents 62c3dd9 + ea5d2a1 commit f2573c8

File tree

9 files changed

+29
-9
lines changed

9 files changed

+29
-9
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,5 @@ jobs:
266266
uses: ncipollo/release-action@v1
267267
with:
268268
allowUpdates: true
269-
tag: v3.0.0
269+
tag: v3.0.1
270270
artifacts: "Output/*"

FUNC.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "FUNC"
5-
#define MyAppVersion "3.0.0"
5+
#define MyAppVersion "3.0.1"
66
#define MyAppPublisher "Galaxy Pay, LLC"
77
#define MyAppPublisherURL "https://galaxy-pay.com"
88
#define MyPublishPath "publish"

FUNC/Node.cs

+21-1
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,29 @@ public static void SetDir(string name, Dir model)
221221
{
222222
string currentPath = Path.Combine(Utils.NodeDataParent(name), name);
223223
string requestPath = Path.Combine(model.Path, name);
224-
Directory.Move(currentPath, requestPath);
224+
CopyFolder(currentPath, requestPath);
225225
string filePath = Path.Combine(Utils.appDataDir, $"{name}.data");
226226
File.WriteAllText(filePath, model.Path);
227+
Directory.Delete(currentPath, true);
228+
}
229+
230+
public static void CopyFolder(string sourceFolder, string destFolder)
231+
{
232+
Directory.CreateDirectory(destFolder);
233+
string[] files = Directory.GetFiles(sourceFolder);
234+
foreach (string file in files)
235+
{
236+
string name = Path.GetFileName(file);
237+
string dest = Path.Combine(destFolder, name);
238+
File.Copy(file, dest);
239+
}
240+
string[] folders = Directory.GetDirectories(sourceFolder);
241+
foreach (string folder in folders)
242+
{
243+
string name = Path.GetFileName(folder);
244+
string dest = Path.Combine(destFolder, name);
245+
CopyFolder(folder, dest);
246+
}
227247
}
228248

229249
public static async Task EnableTelemetry(string name)

FUNC/Utils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static string NodeDataParent(string name)
1313
string nodeDataParent = appDataDir;
1414
string path = Path.Combine(appDataDir, $"{name}.data");
1515
try { nodeDataParent = File.ReadAllText(path); } catch { }
16-
return nodeDataParent;
16+
return nodeDataParent.Trim();
1717
}
1818

1919
public static string Cap(string name)

create-package-deb.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
rm -r Output
22

3-
PKG=Output/func_3.0.0_linux-$1
3+
PKG=Output/func_3.0.1_linux-$1
44

55
mkdir -p $PKG/lib/systemd/system
66
mkdir -p $PKG/opt/func

create-package-pkg.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pkgbuild --root publish \
55
--install-location /opt/func \
66
--scripts pkg/scripts \
77
--identifier func.app \
8-
Output/func_3.0.0_darwin-$1.pkg
8+
Output/func_3.0.1_darwin-$1.pkg

deb/amd64/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: func
2-
Version: 3.0.0
2+
Version: 3.0.1
33
Section: base
44
Priority: optional
55
Architecture: amd64

deb/arm64/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: func
2-
Version: 3.0.0
2+
Version: 3.0.1
33
Section: base
44
Priority: optional
55
Architecture: arm64

webui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "func-webui",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"scripts": {
55
"dev": "vite",
66
"build": "vite build",

0 commit comments

Comments
 (0)