mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-10 17:30:47 +00:00
Cleanup
This commit is contained in:
parent
72ab669158
commit
6a6efa6bdd
@ -136,12 +136,10 @@ bool RascsiImage::CreateImage(int fd, const PbCommand& command)
|
|||||||
string folder = default_image_folder + "/" + filename.substr(0, slash_position);
|
string folder = default_image_folder + "/" + filename.substr(0, slash_position);
|
||||||
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (stat(folder.c_str(), &st)) {
|
if (stat(folder.c_str(), &st) && mkdir(folder.c_str(), 0777) == -1) {
|
||||||
if (mkdir(folder.c_str(), 0777) == -1) {
|
|
||||||
return ReturnStatus(fd, false, "Can't create folder '" + folder + "': " + strerror(errno));
|
return ReturnStatus(fd, false, "Can't create folder '" + folder + "': " + strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
string permission = GetParam(command, "read_only");
|
string permission = GetParam(command, "read_only");
|
||||||
// Since rascsi is running as root ensure that others can access the file
|
// Since rascsi is running as root ensure that others can access the file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user