mRemoteNG / mRemoteNG/mRemoteNG

(Improvement) Writes config files into individual setting folder when in portable mode

Open
#2,499 3 comments 0 reactions 1 assignee View on GitHub

@Kvarkas is already working on this.

Since Oct 9, 2023.

1.77.3 Connections DBs Enhancement In progress Settings
Dominant language
C#
Stars
11.1k
Forks
1.6k
Avg merge
16h 58m
Merged PRs (30d)
55

Description

When mRemoteNG is in portable mode, app should writes config files (.xml) and backup files (.backup) into individual setting folder, not into root directory where exe file exist.

Expected Behavior

When mRemoteNG is in portable mode, new version should writes config files (.xml) and backup files (.backup) into individual setting folder.

Current Behavior

When mRemoteNG is in portable mode, current version writes config files (.xml) and backup files (.backup) into root directory where exe file exist.

Possible Solution

 mRemoteNG/App/Info/SettingsFileInfo.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mRemoteNG/App/Info/SettingsFileInfo.cs b/mRemoteNG/App/Info/SettingsFileInfo.cs
index 1f0a2404..abb3faf4 100644
--- a/mRemoteNG/App/Info/SettingsFileInfo.cs
+++ b/mRemoteNG/App/Info/SettingsFileInfo.cs
@@ -12,7 +12,7 @@ namespace mRemoteNG.App.Info
     {
         private static readonly string ExePath = Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConnectionInfo))?.Location);
 
-        public static string SettingsPath => Runtime.IsPortableEdition ? ExePath : Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName;
+        public static string SettingsPath => Runtime.IsPortableEdition ? ( ExePath + "\\" + "PortableEditionSettings") : (Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName);
 
         public static string LayoutFileName { get; } = "pnlLayout.xml";
         public static string ExtAppsFilesName { get; } = "extApps.xml";

Steps to Reproduce (for bugs)

(Not a bug)

Context

After this change, move and backup setting files (.xml and .backup) will be easier.

Your Environment

  • Version used: v1.77.3-dev
  • Operating System and version: Windows 11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.