Skip to content

Commit

Permalink
Merge pull request #41 from GalaxyPay/dev
Browse files Browse the repository at this point in the history
fix: move data directory cross-drive
  • Loading branch information
acfunk authored Jan 2, 2025
2 parents 62c3dd9 + ea5d2a1 commit f2573c8
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: v3.0.0
tag: v3.0.1
artifacts: "Output/*"
2 changes: 1 addition & 1 deletion FUNC.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "FUNC"
#define MyAppVersion "3.0.0"
#define MyAppVersion "3.0.1"
#define MyAppPublisher "Galaxy Pay, LLC"
#define MyAppPublisherURL "https://galaxy-pay.com"
#define MyPublishPath "publish"
Expand Down
22 changes: 21 additions & 1 deletion FUNC/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,29 @@ public static void SetDir(string name, Dir model)
{
string currentPath = Path.Combine(Utils.NodeDataParent(name), name);
string requestPath = Path.Combine(model.Path, name);
Directory.Move(currentPath, requestPath);
CopyFolder(currentPath, requestPath);
string filePath = Path.Combine(Utils.appDataDir, $"{name}.data");
File.WriteAllText(filePath, model.Path);
Directory.Delete(currentPath, true);
}

public static void CopyFolder(string sourceFolder, string destFolder)
{
Directory.CreateDirectory(destFolder);
string[] files = Directory.GetFiles(sourceFolder);
foreach (string file in files)
{
string name = Path.GetFileName(file);
string dest = Path.Combine(destFolder, name);
File.Copy(file, dest);
}
string[] folders = Directory.GetDirectories(sourceFolder);
foreach (string folder in folders)
{
string name = Path.GetFileName(folder);
string dest = Path.Combine(destFolder, name);
CopyFolder(folder, dest);
}
}

public static async Task EnableTelemetry(string name)
Expand Down
2 changes: 1 addition & 1 deletion FUNC/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static string NodeDataParent(string name)
string nodeDataParent = appDataDir;
string path = Path.Combine(appDataDir, $"{name}.data");
try { nodeDataParent = File.ReadAllText(path); } catch { }
return nodeDataParent;
return nodeDataParent.Trim();
}

public static string Cap(string name)
Expand Down
2 changes: 1 addition & 1 deletion create-package-deb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rm -r Output

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

mkdir -p $PKG/lib/systemd/system
mkdir -p $PKG/opt/func
Expand Down
2 changes: 1 addition & 1 deletion create-package-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pkgbuild --root publish \
--install-location /opt/func \
--scripts pkg/scripts \
--identifier func.app \
Output/func_3.0.0_darwin-$1.pkg
Output/func_3.0.1_darwin-$1.pkg
2 changes: 1 addition & 1 deletion deb/amd64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.0.0
Version: 3.0.1
Section: base
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion deb/arm64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.0.0
Version: 3.0.1
Section: base
Priority: optional
Architecture: arm64
Expand Down
2 changes: 1 addition & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "func-webui",
"version": "3.0.0",
"version": "3.0.1",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down

0 comments on commit f2573c8

Please sign in to comment.