Fix windows file descriptor leak
diff --git a/scrapy/extensions/feedexport.py b/scrapy/extensions/feedexport.py
index ce2846ebada..6fb6397b1e2 100644
--- a/scrapy/extensions/feedexport.py
+++ b/scrapy/extensions/feedexport.py
@@ -242,7 +242,9 @@ def open_spider(self, spider):
     def close_spider(self, spider):
         slot = self.slot
         if not slot.itemcount and not self.store_empty:
-            return
+            # We need to call slot.storage.store nonetheless to get the file
+            # properly closed.
+            return defer.maybeDeferred(slot.storage.store, slot.file)
         if self._exporting:
             slot.exporter.finish_exporting()
             self._exporting = False
diff --git a/tests/test_feedexport.py b/tests/test_feedexport.py
index f32ac2a4be7..e1436fbe5a7 100644
--- a/tests/test_feedexport.py
+++ b/tests/test_feedexport.py
@@ -417,7 +417,7 @@ def run_and_export(self, spider_cls, settings=None):
                 content = f.read()
 
         finally:
-            shutil.rmtree(tmpdir, ignore_errors=True)
+            shutil.rmtree(tmpdir)
 
         defer.returnValue(content)
 

Fixes #3391