Deal more gracefully with a device's library not having any directories on second mount.
Fixes issue #3940
This commit is contained in:
parent
a6f4affc10
commit
95330a3d7c
@ -67,9 +67,9 @@ ConnectedDevice::~ConnectedDevice() {
|
|||||||
|
|
||||||
void ConnectedDevice::InitBackendDirectory(
|
void ConnectedDevice::InitBackendDirectory(
|
||||||
const QString& mount_point, bool first_time, bool rewrite_path) {
|
const QString& mount_point, bool first_time, bool rewrite_path) {
|
||||||
if (first_time)
|
if (first_time || backend_->GetAllDirectories().isEmpty()) {
|
||||||
backend_->AddDirectory(mount_point);
|
backend_->AddDirectory(mount_point);
|
||||||
else {
|
} else {
|
||||||
if (rewrite_path) {
|
if (rewrite_path) {
|
||||||
// This is a bit of a hack. The device might not be mounted at the same
|
// This is a bit of a hack. The device might not be mounted at the same
|
||||||
// path each time, so if it's different we have to munge all the paths in
|
// path each time, so if it's different we have to munge all the paths in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user