[gnome-disk-utility/udisks2-port] Fix fstab validation code
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Fix fstab validation code
- Date: Thu, 19 Jan 2012 19:04:35 +0000 (UTC)
commit 5de3c96c46ba37bcd0b3301cdfa62e7ed674178c
Author: David Zeuthen <davidz redhat com>
Date: Thu Jan 19 14:04:24 2012 -0500
Fix fstab validation code
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gdufstabdialog.c | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/src/palimpsest/gdufstabdialog.c b/src/palimpsest/gdufstabdialog.c
index 95076d5..3c6f353 100644
--- a/src/palimpsest/gdufstabdialog.c
+++ b/src/palimpsest/gdufstabdialog.c
@@ -117,14 +117,19 @@ update (FstabDialogData *data,
g_strcmp0 (ui_type, type) != 0 ||
g_strcmp0 (ui_opts, opts) != 0)
{
- /* sanity-check */
- if (strlen (ui_fsname) > 0 &&
- strlen (ui_dir) > 0 &&
- strlen (ui_type) > 0 &&
- strlen (ui_opts) > 0)
- {
- can_apply = TRUE;
- }
+ can_apply = TRUE;
+ }
+ }
+
+ /* sanity-check and validate */
+ if (ui_configured)
+ {
+ if (strlen (ui_fsname) == 0 ||
+ strlen (ui_dir) == 0 ||
+ strlen (ui_type) == 0 ||
+ strlen (ui_opts) == 0)
+ {
+ can_apply = FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]