FIxed some bug

This commit is contained in:
chris
2022-05-24 14:56:18 +08:00
parent c701acbfaa
commit 310cf3043c
3 changed files with 5 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ on:
- "*" - "*"
env: env:
PLUGIN_NAME: your-plugin-id # Change this to match the id of your plugin. PLUGIN_NAME: obsidian-to-notion # Change this to match the id of your plugin.
jobs: jobs:
build: build:

File diff suppressed because one or more lines are too long

View File

@@ -10,6 +10,7 @@ import {
Plugin, Plugin,
PluginSettingTab, PluginSettingTab,
Setting, Setting,
normalizePath
} from "obsidian"; } from "obsidian";
import { join } from "path"; import { join } from "path";
import * as fs from "fs"; import * as fs from "fs";
@@ -97,7 +98,7 @@ export default class MyPlugin extends Plugin {
const filePath: string = nowFile.path; const filePath: string = nowFile.path;
// @ts-ignore // @ts-ignore
const basePath: string = nowFile.vault.adapter.basePath; const basePath: string = nowFile.vault.adapter.basePath;
const fullPath = join(basePath, filePath); const fullPath = normalizePath(join(basePath, filePath));
console.log("fullpath", fullPath); console.log("fullpath", fullPath);
const fileData = fs.readFileSync(fullPath, "utf8"); const fileData = fs.readFileSync(fullPath, "utf8");
return { return {