From cc1e4d16a29a77ece65ea1e99e9b999ce64fccb5 Mon Sep 17 00:00:00 2001 From: Casey Link Date: Fri, 21 Nov 2014 16:51:45 +0100 Subject: [PATCH] stockpiles: allow loading without file extension --- plugins/stockpiles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/stockpiles.cpp b/plugins/stockpiles.cpp index ed0b253b0..ffc77bdf7 100644 --- a/plugins/stockpiles.cpp +++ b/plugins/stockpiles.cpp @@ -2832,8 +2832,8 @@ static command_result loadstock ( color_ostream &out, vector & paramete } } - if ( file.empty() || !file_exists ( file ) || - !is_dfstockfile ( file ) ) + if ( !is_dfstockfile ( file ) ) file += ".dfstock"; + if ( file.empty() || !file_exists ( file ) ) { out.printerr ( "loadstock: a .dfstock file is required to import\n" ); return CR_WRONG_USAGE;