Fixed the "remove existing mount point" bug
Summary: The QString "contains method" is also searching for empty QStrings. Due to this all entries in /etc/fstab were removed . After this patch it is searching for only non-empty strings in removeMountPoint() function. Reviewers: stikonas Reviewed By: stikonas Tags: #kde_partition_manager Differential Revision: https://phabricator.kde.org/D11542
This commit is contained in:
parent
98209f90bc
commit
a38a6cd35d
|
@ -163,9 +163,9 @@ void EditMountPointDialogWidget::removeMountPoint()
|
||||||
{
|
{
|
||||||
int i=0;
|
int i=0;
|
||||||
for (const auto &e : fstabEntries()) {
|
for (const auto &e : fstabEntries()) {
|
||||||
if(e.fsSpec().contains(partition().deviceNode()) || e.fsSpec().contains(partition().fileSystem().uuid()) ||
|
if((e.fsSpec().contains(partition().deviceNode()) && !partition().deviceNode().isEmpty() ) || (e.fsSpec().contains(partition().fileSystem().uuid()) && !partition().fileSystem().uuid().isEmpty()) ||
|
||||||
e.fsSpec().contains(partition().fileSystem().label()) || e.fsSpec().contains(partition().label()) || e.fsSpec().contains(partition().uuid()) )
|
(e.fsSpec().contains(partition().fileSystem().label()) && !partition().fileSystem().label().isEmpty()) || (e.fsSpec().contains(partition().label()) && !partition().label().isEmpty() ) || (e.fsSpec().contains(partition().uuid()) && !partition().uuid().isEmpty() ) )
|
||||||
{
|
{
|
||||||
fstabEntries().removeAt(i);
|
fstabEntries().removeAt(i);
|
||||||
partition().setMountPoint(QString());
|
partition().setMountPoint(QString());
|
||||||
i--;
|
i--;
|
||||||
|
|
Loading…
Reference in New Issue