Skip to content

Commit b5856ad

Browse files
committed
Merge branch 'release/3.81.2'
2 parents 00b0be5 + 49bdab8 commit b5856ad

File tree

5 files changed

+28
-21
lines changed

5 files changed

+28
-21
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,12 @@ For more information on how to use the following functions, please see [characte
7676

7777
## Changelogs
7878

79-
### [v3.81.0](https://github.com/purocean/yn/releases/tag/v3.81.0) 2025-01-23
79+
### [v3.81.2](https://github.com/purocean/yn/releases/tag/v3.81.2) 2025-01-27
8080

81-
[Windows](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-win-x64-3.81.0.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-mac-arm64-3.81.0.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-mac-x64-3.81.0.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-linux-x86_64-3.81.0.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-linux-amd64-3.81.0.deb)
81+
[Windows](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-win-x64-3.81.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-mac-arm64-3.81.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-mac-x64-3.81.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-linux-x86_64-3.81.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-linux-amd64-3.81.2.deb)
8282

83-
1. feat: Support for opening SMB path files on Windows
84-
2. feat: Optimization of presentation mode directory display, with fixed directories now shown in a sidebar format
85-
3. feat: Optimization of audio element rendering logic to reduce document opening block time
86-
4. fix: Resolution of inline Wiki-style image rendering exceptions
87-
5. fix: Resolution of potential orphan process issues when exiting the application
88-
6. fix: Resolution of the inability to save empty files
89-
7. fix: Resolution of the issue where shared preview files do not display
83+
1. fix: Resolve the issue of not being able to load images when opening files outside the repository.
84+
2. fix: Resolve the issue of abnormal reports appearing when exiting the terminal on the macOS platform.
9085

9186
[More release notes](https://github.com/purocean/yn/releases)
9287

README_ZH-CN.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,12 @@
7676

7777
## 更新日志
7878

79-
### [v3.81.0](https://github.com/purocean/yn/releases/tag/v3.81.0) 2025-01-23
79+
### [v3.81.2](https://github.com/purocean/yn/releases/tag/v3.81.2) 2025-01-27
8080

81-
[Windows](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-win-x64-3.81.0.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-mac-arm64-3.81.0.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-mac-x64-3.81.0.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-linux-x86_64-3.81.0.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.81.0/Yank-Note-linux-amd64-3.81.0.deb)
81+
[Windows](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-win-x64-3.81.2.exe) | [macOS arm64](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-mac-arm64-3.81.2.dmg) | [macOS x64](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-mac-x64-3.81.2.dmg) | [Linux AppImage](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-linux-x86_64-3.81.2.AppImage) | [Linux deb](https://github.com/purocean/yn/releases/download/v3.81.2/Yank-Note-linux-amd64-3.81.2.deb)
8282

83-
1. feat: 支持在 Windows 上打开 smb 路径文件
84-
2. feat: 优化演示模式目录展示,固定目录后将以侧栏形式展示目录
85-
3. feat: 优化音频元素渲染逻辑,减少文档打开阻塞时间
86-
4. fix: 修复行内 Wiki 风格图片渲染异常问题
87-
5. fix: 修复退出应用可能残留孤儿进程问题
88-
6. fix: 修复不能保存空文件问题
89-
7. fix: 修复分享预览文件不显示问题
83+
1. fix: 修复打开仓库外文件不能加载图片问题
84+
2. fix: 修复在 macOS 平台打开终端时候退出出现异常报告问题
9085

9186
[更多发布说明](https://github.com/purocean/yn/releases)
9287

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yank.note",
3-
"version": "3.81.0",
3+
"version": "3.81.2",
44
"description": "Yank Note: A highly extensible Markdown editor, designed for productivity.",
55
"main": "dist/main/app.js",
66
"license": "AGPL-3.0",

src/main/server/file.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ function withRepo<T> (repo = 'main', callback: (repoPath: string, ...targetPath:
8282
}
8383

8484
return callback(repoPath, ...target.map(x => {
85+
// fix path
86+
if (!x.startsWith('/')) {
87+
x = '/' + x
88+
}
89+
8590
const targetPath = isRootRepo
8691
? x.replace(/^\//, repoPath) // replace first / to repoPath for case of `\\127.0.0.1/test/a.md`
8792
: path.join(repoPath, x)

src/main/server/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,18 @@ const server = (port = 3000) => {
806806
env: process.env,
807807
useConpty: false,
808808
})
809+
810+
const kill = () => {
811+
ptyProcess.kill()
812+
}
813+
809814
ptyProcess.onData((data: any) => socket.emit('output', data))
810-
ptyProcess.onExit(() => socket.disconnect())
815+
ptyProcess.onExit(() => {
816+
console.log('ptyProcess exit')
817+
socket.disconnect()
818+
process.off('exit', kill)
819+
})
820+
811821
socket.on('input', (data: any) => {
812822
if (data.startsWith(shell.CD_COMMAND_PREFIX)) {
813823
ptyProcess.write(shell.transformCdCommand(data.toString()))
@@ -816,7 +826,9 @@ const server = (port = 3000) => {
816826
}
817827
})
818828
socket.on('resize', (size: any) => ptyProcess.resize(size[0], size[1]))
819-
socket.on('disconnect', () => ptyProcess.kill())
829+
socket.on('disconnect', kill)
830+
831+
process.on('exit', kill)
820832
} else {
821833
socket.emit('output', 'node-pty is not compatible with this platform. Please install another version from GitHub https://github.com/purocean/yn/releases')
822834
}

0 commit comments

Comments
 (0)