From 54b47925aff2dba0493140c6d90b84bc0c525bac Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 29 Sep 2008 16:35:42 +0000 Subject: default to HAL mounted disc path (#39802) git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@247031 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94 --- NEWS | 1 + draksnapshot-config | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0824772..fa838a3 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ thus not detecting some internal SATA discs (#41107) - configurator: o do not save config when clicking "Close" (#39790) + o default to HAL mounted disc path (#39802) Version 0.14 - 26 September 2008, Thierry Vignaud diff --git a/draksnapshot-config b/draksnapshot-config index 149cf74..b12d8dc 100755 --- a/draksnapshot-config +++ b/draksnapshot-config @@ -26,6 +26,7 @@ use standalone; #- warning, standalone must be loaded very first, for 'expla use common; use interactive; use MDV::Snapshot::Common; +use MDV::Snapshot::Hal; # i18n: IMPORTANT: to get correct namespace (drakconf instead of libDrakX) BEGIN { unshift @::textdomains, 'draksnapshot' } @@ -102,7 +103,13 @@ my %interval_titles = ( my (%entries, $where); # if not configured, just default where will be mounted the discs by HAL: -$backup_directory ||= '/media/'; +if (!$backup_directory || $::testing) { + my $dbus = get_system_bus(); + if ($dbus) { + my @discs = map { $_->GetProperty('volume.mount_point') } find_removable_volumes($dbus); + $backup_directory = $discs[0]; + } +} my $dialog = ugtk2->new(N("Backup snapshots configuration")); my $d_window = $dialog->{window}; -- cgit v1.2.1