We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b196ea commit 9aadb1fCopy full SHA for 9aadb1f
src/main.ts
@@ -304,10 +304,9 @@ export default class CopyUrlInPreview extends Plugin {
304
})
305
);
306
if (protocol === "app:" && Platform.isDesktop) {
307
- // href probably also works
308
// getResourcePath("") also works for root path
309
const baseFilePath = (this.app.vault.adapter as FileSystemAdapterWithInternalApi).getFilePath("");
310
- const baseFilePathName: string = (baseFilePath as any).pathname;
+ const baseFilePathName: string = baseFilePath.replace("file://", "");
311
const urlPathName: string = (url as any).pathname;
312
if (urlPathName.startsWith(baseFilePathName)) {
313
let relativePath = urlPathName.replace(baseFilePathName, "");
0 commit comments