Skip to content

Commit f933f9d

Browse files
committed
cater for debug mode
1 parent 830378e commit f933f9d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Wox.Core/Configuration/Portable.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ public void DisablePortableMode()
2222
try
2323
{
2424
MoveUserDataFolder(DataLocation.PortableDataPath, DataLocation.RoamingDataPath);
25+
#if DEBUG
26+
// Create shortcuts and uninstaller are not required in debug mode,
27+
// otherwise will repoint the path of the actual installed production version to the debug version
28+
#else
2529
CreateShortcuts();
2630
CreateUninstallerEntry();
31+
#endif
2732
IndicateDeletion(DataLocation.PortableDataPath);
2833

2934
MessageBox.Show("Wox needs to restart to finish disabling portable mode, " +
@@ -53,8 +58,13 @@ public void EnablePortableMode()
5358
try
5459
{
5560
MoveUserDataFolder(DataLocation.RoamingDataPath, DataLocation.PortableDataPath);
61+
#if DEBUG
62+
// Remove shortcuts and uninstaller are not required in debug mode,
63+
// otherwise will delete the actual installed production version
64+
#else
5665
RemoveShortcuts();
5766
RemoveUninstallerEntry();
67+
#endif
5868
IndicateDeletion(DataLocation.RoamingDataPath);
5969

6070
MessageBox.Show("Wox needs to restart to finish enabling portable mode, " +

0 commit comments

Comments
 (0)