Fix various clazy warnings
This commit is contained in:
@@ -80,7 +80,8 @@ ConnectedDevice::~ConnectedDevice() {
|
||||
|
||||
void ConnectedDevice::InitBackendDirectory(const QString &mount_point, const bool first_time, const bool rewrite_path) {
|
||||
|
||||
if (first_time || backend_->GetAllDirectories().isEmpty()) {
|
||||
QList<Directory> directories = backend_->GetAllDirectories();
|
||||
if (first_time || directories.isEmpty()) {
|
||||
backend_->AddDirectory(mount_point);
|
||||
}
|
||||
else {
|
||||
@@ -91,7 +92,7 @@ void ConnectedDevice::InitBackendDirectory(const QString &mount_point, const boo
|
||||
// This can be done entirely in sqlite so it's relatively fast...
|
||||
|
||||
// Get the directory it was mounted at last time. Devices only have one directory (the root).
|
||||
Directory dir = backend_->GetAllDirectories()[0];
|
||||
Directory dir = directories[0];
|
||||
if (dir.path != mount_point) {
|
||||
// The directory is different, commence the munging.
|
||||
qLog(Info) << "Changing path from" << dir.path << "to" << mount_point;
|
||||
|
||||
Reference in New Issue
Block a user