File tree 1 file changed +14
-1
lines changed
FlashpointInstaller/src/Forms
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Diagnostics ;
3
3
using System . IO ;
4
+ using System . Linq ;
4
5
using System . Windows . Forms ;
5
6
using System . Xml ;
6
7
@@ -117,12 +118,24 @@ private void InstallButton_Click(object sender, EventArgs e)
117
118
{
118
119
if ( ! FPM . VerifyDestinationPath ( DestinationPath . Text ) || ! FPM . CheckDependencies ( ) ) return ;
119
120
121
+ if ( Directory . Exists ( DestinationPath . Text ) && Directory . EnumerateFileSystemEntries ( DestinationPath . Text ) . Any ( ) )
122
+ {
123
+ var pathDialog = MessageBox . Show (
124
+ "There are already files in the specified path.\n \n " +
125
+ "If you uninstall Flashpoint, these files will be deleted as well.\n \n " +
126
+ "Are you sure you want to continue?" ,
127
+ "Warning" , MessageBoxButtons . YesNo , MessageBoxIcon . Warning
128
+ ) ;
129
+
130
+ if ( pathDialog == DialogResult . No ) return ;
131
+ }
132
+
120
133
if ( DestinationPath . Text . Length >= 192 )
121
134
{
122
135
var pathDialog = MessageBox . Show (
123
136
"The specified path is extremely long. This may cause certain functionality to break.\n \n " +
124
137
"Are you sure you want to continue?" ,
125
- "Error " , MessageBoxButtons . YesNo , MessageBoxIcon . Warning
138
+ "Warning " , MessageBoxButtons . YesNo , MessageBoxIcon . Warning
126
139
) ;
127
140
128
141
if ( pathDialog == DialogResult . No ) return ;
You can’t perform that action at this time.
0 commit comments