Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Pika Backup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
34
Issues
34
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
World
Pika Backup
Commits
5f717aec
Commit
5f717aec
authored
Aug 28, 2020
by
Sophie Herold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch volume and device info at repo create
Fixes #30
parent
6dffb549
Pipeline
#208640
canceled with stage
in 6 minutes and 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
src/shared.rs
src/shared.rs
+8
-7
src/ui.rs
src/ui.rs
+0
-1
src/ui/device_missing.rs
src/ui/device_missing.rs
+0
-1
No files found.
src/shared.rs
View file @
5f717aec
...
...
@@ -89,15 +89,16 @@ impl BackupConfig {
}
pub
fn
new_from_path
(
repo
:
&
path
::
Path
)
->
Self
{
let
repo_file
=
gio
::
File
::
new_for_path
(
&
repo
);
let
repo_file
=
gio
::
File
::
new_for_path
(
&
if
repo
.exists
()
{
repo
}
else
{
// for new repos the repo directory itself usually doesen't exist
repo
.parent
()
.unwrap_or
(
repo
)
});
let
none
:
Option
<&
gio
::
Cancellable
>
=
None
;
let
mount
=
repo_file
.find_enclosing_mount
(
none
)
.ok
();
debug!
(
"Mount found: {:?} {:?} {:?}"
,
&
repo
,
&
mount
,
repo_file
.is_native
()
);
debug!
(
"Mount found: {:?} {:?} {:?}"
,
&
repo
,
&
mount
,
repo_file
);
let
drive
=
mount
.as_ref
()
.and_then
(
gio
::
Mount
::
get_drive
);
let
volume_uuid
=
mount
.as_ref
()
.and_then
(
get_mount_uuid
);
...
...
src/ui.rs
View file @
5f717aec
...
...
@@ -4,7 +4,6 @@ use std::io::prelude::*;
use
gdk_pixbuf
::
prelude
::
*
;
use
gio
::
prelude
::
*
;
use
gtk
::
prelude
::
*
;
use
glib
;
use
crate
::
borg
;
use
crate
::
shared
;
...
...
src/ui/device_missing.rs
View file @
5f717aec
use
gio
;
use
gio
::
prelude
::
*
;
use
gtk
::
prelude
::
*
;
use
std
::
rc
::
Rc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment