Skip to content

Commit

Permalink
Warn about unlistenable folders
Browse files Browse the repository at this point in the history
  • Loading branch information
rumtid committed Aug 10, 2023
1 parent 657e24b commit e95f2ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/ui/create-repo-dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,16 @@ void CreateRepoDialog::createSuccess(const RepoDownloadInfo& info)
error = translateErrorMsg(error);
seafApplet->warningBox(tr("Failed to add download task:\n %1").arg(error), this);
setAllInputsEnabled(true);
} else {
repos_tab_->refresh();
done(QDialog::Accepted);
return;
}

QFileSystemWatcher watcher;
if (!watcher.addPath(path_)) {
seafApplet->warningBox(tr("Library \"%1\" may not sync automatically, please set a sync interval afterwards.").arg(info.repo_name), this);
}

repos_tab_->refresh();
done(QDialog::Accepted);
}

void CreateRepoDialog::createFailed(const ApiError& error)
Expand Down
10 changes: 8 additions & 2 deletions src/ui/download-repo-dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,15 @@ void DownloadRepoDialog::onDownloadRepoRequestSuccess(const RepoDownloadInfo& in
}
seafApplet->warningBox(tr("Failed to add download task:\n %1").arg(error), this);
setAllInputsEnabled(true);
} else {
done(QDialog::Accepted);
return;
}

QFileSystemWatcher watcher;
if (!watcher.addPath(worktree)) {
seafApplet->warningBox(tr("Library \"%1\" may not sync automatically, please set a sync interval afterwards.").arg(repo_.name), this);
}

done(QDialog::Accepted);
}


Expand Down

0 comments on commit e95f2ea

Please sign in to comment.