mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix search action (#14937)
* fix search action * remove book version from book tree item
This commit is contained in:
@@ -316,7 +316,7 @@ export class BookTocManager implements IBookTocManager {
|
||||
* @param section The section that's been moved.
|
||||
* @param book The target book.
|
||||
*/
|
||||
async moveSectionFiles(section: BookTreeItem, book: BookTreeItem): Promise<void> {
|
||||
async moveSectionFiles(section: BookTreeItem, bookItem: BookTreeItem): Promise<void> {
|
||||
const uri = path.posix.join(path.posix.sep, path.relative(section.rootContentPath, section.book.contentPath));
|
||||
let moveFile = path.join(path.parse(uri).dir, path.parse(uri).name);
|
||||
let fileName = undefined;
|
||||
@@ -349,9 +349,9 @@ export class BookTocManager implements IBookTocManager {
|
||||
this.cleanUp(path.dirname(section.book.contentPath));
|
||||
}
|
||||
|
||||
if (book.version === BookVersion.v1) {
|
||||
if (bookItem.book.version === BookVersion.v1) {
|
||||
// here we only convert if is v1 because we are already using the v2 notation for every book that we read.
|
||||
this.newSection = convertTo(book.version, this.newSection);
|
||||
this.newSection = convertTo(bookItem.book.version, this.newSection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,9 +385,9 @@ export class BookTocManager implements IBookTocManager {
|
||||
fileName = fileName === undefined ? filePath.name : path.parse(fileName).name;
|
||||
this.newSection.file = path.posix.join(path.posix.sep, fileName);
|
||||
this.newSection.title = file.book.title;
|
||||
if (book.version === BookVersion.v1) {
|
||||
if (book.book.version === BookVersion.v1) {
|
||||
// here we only convert if is v1 because we are already using the v2 notation for every book that we read.
|
||||
this.newSection = convertTo(book.version, this.newSection);
|
||||
this.newSection = convertTo(book.book.version, this.newSection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user