File tree 1 file changed +10
-2
lines changed
app/src/main/java/ru/meefik/linuxdeploy/adapter
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,23 @@ public void setMounts(List<String> mounts) {
56
56
this .mounts .clear ();
57
57
for (String mount : mounts ) {
58
58
String [] tmp = mount .split (":" , 2 );
59
- this .mounts .add (new Mount (tmp [0 ], tmp [1 ]));
59
+ if (tmp .length > 1 ) {
60
+ this .mounts .add (new Mount (tmp [0 ], tmp [1 ]));
61
+ } else {
62
+ this .mounts .add (new Mount (tmp [0 ], "" ));
63
+ }
60
64
}
61
65
notifyDataSetChanged ();
62
66
}
63
67
64
68
public List <String > getMounts () {
65
69
List <String > mounts = new ArrayList <>();
66
70
for (Mount mount : this .mounts ) {
67
- mounts .add (mount .getSource () + ":" + mount .getTarget ());
71
+ if (mount .getTarget ().isEmpty ()) {
72
+ mounts .add (mount .getSource ());
73
+ } else {
74
+ mounts .add (mount .getSource () + ":" + mount .getTarget ());
75
+ }
68
76
}
69
77
return mounts ;
70
78
}
You can’t perform that action at this time.
0 commit comments