mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-30 00:43:33 +08:00
FIxed some bug
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- "*"
|
||||
|
||||
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:
|
||||
build:
|
||||
|
||||
3
main.ts
3
main.ts
@@ -10,6 +10,7 @@ import {
|
||||
Plugin,
|
||||
PluginSettingTab,
|
||||
Setting,
|
||||
normalizePath
|
||||
} from "obsidian";
|
||||
import { join } from "path";
|
||||
import * as fs from "fs";
|
||||
@@ -97,7 +98,7 @@ export default class MyPlugin extends Plugin {
|
||||
const filePath: string = nowFile.path;
|
||||
// @ts-ignore
|
||||
const basePath: string = nowFile.vault.adapter.basePath;
|
||||
const fullPath = join(basePath, filePath);
|
||||
const fullPath = normalizePath(join(basePath, filePath));
|
||||
console.log("fullpath", fullPath);
|
||||
const fileData = fs.readFileSync(fullPath, "utf8");
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user