From 8f4b80959992b61c05ee77538fa3d8794b052469 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sat, 14 Oct 2023 15:38:08 +0300 Subject: [PATCH] Fix the insufficient privileges message in symbol remap dialog. (cherry picked from commit 7b94ecdc0183ac7afff782e9d925efd093559ca1) --- eeschema/dialogs/dialog_symbol_remap.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/eeschema/dialogs/dialog_symbol_remap.cpp b/eeschema/dialogs/dialog_symbol_remap.cpp index 34ecd15df9..37c5edfbd9 100644 --- a/eeschema/dialogs/dialog_symbol_remap.cpp +++ b/eeschema/dialogs/dialog_symbol_remap.cpp @@ -6,7 +6,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Wayne Stambaugh - * Copyright (C) 2017-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2017-2023 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -54,10 +54,16 @@ DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP( SCH_EDIT_FRAME* aParent ) : { m_remapped = false; - if( !wxFileName::IsDirWritable( Prj().GetProjectPath() ) ) + wxString projectPath = Prj().GetProjectPath(); + + if( !wxFileName::IsDirWritable( projectPath ) ) { - DisplayInfoMessage( this, _( "Remapping is not possible because you have insufficient " - "privileges to the project folder '%s'." ) ); + wxString msg = + wxString::Format( _( "Remapping is not possible because you have insufficient " + "privileges to the project folder '%s'." ), + projectPath ); + + DisplayInfoMessage( this, msg ); // Disable the remap button. m_remapped = true;