From 28143697b6715d4e7742dd796a9d147b27bb7260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 20 Dec 2023 18:24:18 +0100 Subject: [PATCH] Fix regression from #18581 --- Common/File/FileUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/File/FileUtil.cpp b/Common/File/FileUtil.cpp index a431272bc3..184f45ebfd 100644 --- a/Common/File/FileUtil.cpp +++ b/Common/File/FileUtil.cpp @@ -519,8 +519,8 @@ bool CreateDir(const Path &path) { // Convert it to a "CreateDirIn" call, if possible, since that's // what we can do with the storage API. AndroidContentURI uri(path.ToString()); + std::string newDirName = uri.GetLastPart(); if (uri.NavigateUp()) { - std::string newDirName = uri.GetLastPart(); INFO_LOG(COMMON, "Calling Android_CreateDirectory(%s, %s)", uri.ToString().c_str(), newDirName.c_str()); return Android_CreateDirectory(uri.ToString(), newDirName) == StorageError::SUCCESS; } else {