Skip to content

Commit 1302f76

Browse files
committed
🐛 Fix: picgo-gui clipboard image uploading error
1 parent 16b447d commit 1302f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/getClipboardImage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const getClipboardImage = async (ctx: IPicGo): Promise<IClipboardImage> => {
6161
const imagePath = path.join(ctx.baseDir, `${dayjs().format('YYYYMMDDHHmmss')}.png`)
6262
return await new Promise<IClipboardImage>((resolve: Function, reject: Function): void => {
6363
const platform = getCurrentPlatform()
64-
const scriptPath = path.join(__dirname, platform2ScriptFilename[platform])
64+
const scriptPath = path.join(ctx.baseDir, platform2ScriptFilename[platform])
6565
// If the script does not exist yet, we need to write the content to the script file
6666
if (!fs.existsSync(scriptPath)) {
6767
fs.writeFileSync(

0 commit comments

Comments
 (0)