From 1004452bfd40e054c51a783bc65baa3463a1b584 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Tue, 29 Jun 2010 14:18:02 -0400 Subject: fix for windows --- jstests/tool/files1.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'jstests/tool/files1.js') diff --git a/jstests/tool/files1.js b/jstests/tool/files1.js index a73cdc04718..9098c4597cc 100644 --- a/jstests/tool/files1.js +++ b/jstests/tool/files1.js @@ -4,8 +4,12 @@ t = new ToolTest( "files1" ) db = t.startDB(); -t.runTool( "files" , "-d" , t.baseName , "put" , 'mongod' ); -md5 = md5sumFile('mongod'); +filename = 'mongod' +if ( _isWindows() ) + filename += '.exe' + +t.runTool( "files" , "-d" , t.baseName , "put" , filename ); +md5 = md5sumFile(filename); file_obj = db.fs.files.findOne() md5_stored = file_obj.md5; @@ -19,7 +23,7 @@ try { runProgram('mkdir', t.ext); } -t.runTool( "files" , "-d" , t.baseName , "get" , 'mongod' , '-l' , t.extFile ); +t.runTool( "files" , "-d" , t.baseName , "get" , filename , '-l' , t.extFile ); md5 = md5sumFile(t.extFile); assert.eq( md5 , md5_stored , "B" ); -- cgit v1.2.1