Skip to content

Commit

Permalink
release: 0.38.3-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
RyotaUshio committed Mar 17, 2024
1 parent 688f2b9 commit ab9bf14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "pdf-plus",
"name": "PDF++",
"version": "0.38.2",
"version": "0.38.3-beta1",
"minAppVersion": "1.4.16",
"description": "The most Obsidian-native PDF annotation tool ever.",
"author": "Ryota Ushio",
Expand Down
7 changes: 3 additions & 4 deletions src/modals/external-pdf-modals.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PDFPlusModal } from 'modals';
import { Notice, Platform, Setting, normalizePath } from 'obsidian';
import { FuzzyFolderSuggest, getPathSeparator } from 'utils';
import { FuzzyFolderSuggest } from 'utils';


export class ExternalPDFModal extends PDFPlusModal {
Expand Down Expand Up @@ -114,7 +114,7 @@ export class ExternalPDFModal extends PDFPlusModal {
]
});
if (paths && paths.length > 0) {
this.urls = paths.map((path) => 'file://' + path);
this.urls = paths.map((path) => 'file://' + path.replace(/\\/g, '/'));
this.display();
}
});
Expand Down Expand Up @@ -246,9 +246,8 @@ export class ExternalPDFModal extends PDFPlusModal {
};

if (this.source === 'file' && this.folderPath) {
const sep = getPathSeparator();
for (const url of this.urls) {
const filePath = normalizePath(this.folderPath + '/' + url.split(sep).pop());
const filePath = normalizePath(this.folderPath + '/' + url.split('/').pop());
if (!filePath.endsWith('.pdf')) {
failed.push(url);
continue;
Expand Down

0 comments on commit ab9bf14

Please sign in to comment.