Skip to content
Permalink
Browse files

Append world name instead of just .fcm when path ends with / or \ in …

…/wsave
  • Loading branch information...
UnknownShadow200 committed May 23, 2017
1 parent cfb6a88 commit cd4fd1fe6057c00e4df4825c4b466871da6346fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 fCraft/Commands/WorldCommands.cs
@@ -2738,7 +2738,7 @@ static void WorldClearHandler(Player player, CommandReader cmd)

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

0 comments on commit cd4fd1f

Please sign in to comment.
You can’t perform that action at this time.