Skip to content

Commit

Permalink
Append world name instead of just .fcm when path ends with / or \ in …
Browse files Browse the repository at this point in the history
…/wsave
  • Loading branch information
UnknownShadow200 committed May 23, 2017
1 parent cfb6a88 commit cd4fd1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fCraft/Commands/WorldCommands.cs
Expand Up @@ -2738,7 +2738,7 @@ static void WorldClearHandler(Player player, CommandReader cmd)


// normalize the path // normalize the path
fileName = fileName.Replace( Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar ); fileName = fileName.Replace( Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar );
if( fileName.EndsWith( "/" ) && fileName.EndsWith( @"\" ) ) { if( fileName.EndsWith( "/" ) || fileName.EndsWith( @"\" ) ) {
fileName += world.Name + ".fcm"; fileName += world.Name + ".fcm";
} else if( !fileName.CaselessEnds( ".fcm" ) ) { } else if( !fileName.CaselessEnds( ".fcm" ) ) {
fileName += ".fcm"; fileName += ".fcm";
Expand Down

0 comments on commit cd4fd1f

Please sign in to comment.