Skip to content

Commit cd4fd1f

Browse files
Append world name instead of just .fcm when path ends with / or \ in /wsave
1 parent cfb6a88 commit cd4fd1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fCraft/Commands/WorldCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2738,7 +2738,7 @@ static void WorldSaveHandler( Player player, CommandReader cmd ) {
27382738

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

0 commit comments

Comments
 (0)