Commit 7ca56c74 authored by Patrick Spendrin's avatar Patrick Spendrin

fix endless loop

do not go into infinite loop in "save diff"

BUG:238297
parent 08cd8fdb
......@@ -50,13 +50,13 @@ KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString dest
// Find a common root.
KUrl root( sourceURL );
while( root.isValid() && !root.isParentOf( destinationURL ) ) {
while( root.isValid() && !root.isParentOf( destinationURL ) && root != root.upUrl() ) {
root = root.upUrl();
}
// If we found a common root, change to that directory and
// strip the common part from source and destination.
if( root.isValid() ) {
if( root.isValid() && root != root.upUrl() ) {
m_directoryRequester->setUrl( root.url() );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment