зеркало из https://github.com/electron/electron.git
fix: normalize path before calling `showItemInFolder` and `openPath` (#41642)
* fix: normalize path before calling ShowItemInFolder * fix: normalize path before calling OpenPath
This commit is contained in:
Родитель
707b9a58cc
Коммит
90a7e5acae
|
@ -336,7 +336,8 @@ void ShowItemInFolder(const base::FilePath& full_path) {
|
|||
base::ThreadPool::CreateCOMSTATaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::USER_BLOCKING})
|
||||
->PostTask(FROM_HERE,
|
||||
base::BindOnce(&ShowItemInFolderOnWorkerThread, full_path));
|
||||
base::BindOnce(&ShowItemInFolderOnWorkerThread,
|
||||
full_path.NormalizePathSeparators()));
|
||||
}
|
||||
|
||||
void OpenPath(const base::FilePath& full_path, OpenCallback callback) {
|
||||
|
@ -344,8 +345,10 @@ void OpenPath(const base::FilePath& full_path, OpenCallback callback) {
|
|||
|
||||
base::ThreadPool::CreateCOMSTATaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::USER_BLOCKING})
|
||||
->PostTaskAndReplyWithResult(FROM_HERE,
|
||||
base::BindOnce(&OpenPathOnThread, full_path),
|
||||
->PostTaskAndReplyWithResult(
|
||||
FROM_HERE,
|
||||
base::BindOnce(&OpenPathOnThread,
|
||||
full_path.NormalizePathSeparators()),
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче