Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
1f2ff4a6
Commit
1f2ff4a6
authored
Oct 26, 2016
by
Francesc Guasch
Browse files
Don't create new Void image if already exists
parent
cdd7679e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Domain/Void.pm
View file @
1f2ff4a6
...
...
@@ -26,13 +26,17 @@ sub BUILD {
my
$self
=
shift
;
my
$args
=
$_
[
0
];
mkdir
$DIR_TMP
or
die
"
$! when mkdir
$DIR_TMP
"
if
!
-
e
$DIR_TMP
;
return
if
$args
->
{
id_base
};
my
$file_img
=
"
$DIR_TMP
/
"
.
$self
->
name
.
"
.img
";
return
if
-
e
$file_img
;
$self
->
add_volume
(
name
=>
'
void-diska
'
,
size
=>
$args
->
{
disk
}
,
path
=>
"
$DIR_TMP
/
"
.
$self
->
name
.
"
.
img
"
);
,
path
=>
$file_
img
);
$self
->
_set_default_info
();
$self
->
set_memory
(
$args
->
{
memory
})
if
$args
->
{
memory
};
}
...
...
Write
Preview
Supports
Markdown
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