From c7b0c46d9fc95bcc6c7c82a80f51abad06273fe6 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Thu, 12 Jan 2017 21:36:32 +0100
Subject: [PATCH] output/recorder: fix typo in variable name

Fixes the dreaded error "Failed to create : No such file or
directory".

 https://bugs.musicpd.org/view.php?id=4625
---
 NEWS                                        | 1 +
 src/output/plugins/RecorderOutputPlugin.cxx | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index e01b5ed6d..8d4064b11 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ ver 0.20.2 (not yet released)
   - alsa: fix the DSD_U32 sample rate
   - alsa: fix the DSD_U32 byte order
   - alsa: support DSD_U16
+  - recorder: fix error "Failed to create : No such file or directory"
 
 ver 0.20.1 (2017/01/09)
 * input
diff --git a/src/output/plugins/RecorderOutputPlugin.cxx b/src/output/plugins/RecorderOutputPlugin.cxx
index 487edacde..a934e3bfe 100644
--- a/src/output/plugins/RecorderOutputPlugin.cxx
+++ b/src/output/plugins/RecorderOutputPlugin.cxx
@@ -274,7 +274,7 @@ RecorderOutput::ReopenFormat(AllocatedPath &&new_path)
 	assert(path.IsNull());
 	assert(file == nullptr);
 
-	FileOutputStream *new_file = new FileOutputStream(path);
+	FileOutputStream *new_file = new FileOutputStream(new_path);
 
 	AudioFormat new_audio_format = effective_audio_format;