[gparted] Only execute mkudffs during detection when it is known to exist (#786050)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Only execute mkudffs during detection when it is known to exist (#786050)
- Date: Thu, 10 Aug 2017 16:13:13 +0000 (UTC)
commit c353630312bb05c53ff4221bff6b2cbad58a6ca3
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Tue Aug 8 20:30:23 2017 +0100
Only execute mkudffs during detection when it is known to exist (#786050)
When udftools are not installed and the mkudffs program isn't found
GParted would report this error during startup:
# ./gpartedbin
======================
libparted : 3.1
======================
Failed to execute child process "mkudffs" (No such file or directory)
Only run mkudffs to check for an old version when the program is found.
Bug 786050 - GParted reports failed to execute child process "mkudffs"
when it is not installed
src/udf.cc | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/udf.cc b/src/udf.cc
index c0ee8db..6884f9e 100644
--- a/src/udf.cc
+++ b/src/udf.cc
@@ -41,15 +41,16 @@ FS udf::get_filesystem_support()
fs.MIN = MIN_UDF_BLOCKS * MIN_UDF_BLOCKSIZE;
fs.MAX = MAX_UDF_BLOCKS * MAX_UDF_BLOCKSIZE;
+ old_mkudffs = false;
if ( ! Glib::find_program_in_path( "mkudffs" ).empty() )
{
fs.create = FS::EXTERNAL;
fs.create_with_label = FS::EXTERNAL;
- }
- // Detect old mkudffs prior to version 1.1 by lack of --label option.
- Utils::execute_command( "mkudffs --help", output, error, true );
- old_mkudffs = Utils::regexp_label( output + error, "--label" ).empty();
+ // Detect old mkudffs prior to version 1.1 by lack of --label option.
+ Utils::execute_command( "mkudffs --help", output, error, true );
+ old_mkudffs = Utils::regexp_label( output + error, "--label" ).empty();
+ }
// NOTE: Other external programs do not exist yet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]