@@ -113,7 +113,7 @@ String get(String key) {
113
113
114
114
Player getOwner () throws FileNotFoundException {
115
115
if (owner == null ) {
116
- String steamPath = properties .get ("steam path" ) + File . separator ;
116
+ String steamPath = FileUtilities . normalizeDirectoryPath ( properties .get ("steam path" )) ;
117
117
if (!new File (steamPath ).exists ()) {
118
118
throw new FileNotFoundException ("Error: Could not find a Steam installation. "
119
119
+ "Check your Steam path in properties/properties.txt" );
@@ -153,14 +153,15 @@ Player getOwner() throws FileNotFoundException {
153
153
private File getUserDirectory (String steamPath ) throws FileNotFoundException {
154
154
File userdata = new File (steamPath + "userdata" );
155
155
if (!userdata .exists ()) {
156
- throw new FileNotFoundException ("Error: Could not find Steam userdata directory: " + userdata .getAbsolutePath ());
156
+ throw new FileNotFoundException (
157
+ "Error: Could not find Steam userdata directory: " + userdata .getAbsolutePath ());
157
158
}
158
159
List <File > users = Arrays .asList (userdata .listFiles ());
159
160
for (Iterator <File > iterator = users .iterator (); iterator .hasNext ();) {
160
- File user = iterator .next ();
161
- if (!user .getName ().matches ("[0-9]+" )) {
162
- iterator .remove ();
163
- }
161
+ File user = iterator .next ();
162
+ if (!user .getName ().matches ("[0-9]+" )) {
163
+ iterator .remove ();
164
+ }
164
165
}
165
166
File userDirectory = users .get (0 ); // May be wrong account
166
167
String steamId3 = properties .get ("steamid3" );
@@ -174,7 +175,7 @@ private File getUserDirectory(String steamPath) throws FileNotFoundException {
174
175
}
175
176
return userDirectory ;
176
177
}
177
-
178
+
178
179
/**
179
180
* Returns a set containing each admin listed in the <code>admins</code> file.
180
181
*
0 commit comments