banner
飞翔@羽毛

©XYZ翠翔羽翥xLog

羽毛翻飞^^变幻弦波~~
bilibili
douban
github
x
xiaoyuzhou
zhihu
email

Finally solved the problem of opening files with local links in Dy.

Origin#

Dy supports the .md format quite well, allowing you to open files directly by clicking on local links, which is an important reason for the transfer from WF.

I have been enjoying this treatment on my Win10 computer at home, but I always get error prompts on my Win11 computer in the office. I thought it was due to system incompatibility and didn't pay much attention. This year, I bought a new laptop with the same Win10 system, but encountered the same problem as the office computer. After ruling out system issues, I started looking for other reasons.

Dilemma#

After comparison, the version number displayed in the application list in the system settings of the three computers is all 1.0.6, but the version displayed in the About section of the Dy software is different - the good computer is "1.5.1", while the bad computer is "Unknown".

The installation file downloaded from the official website has not changed in recent years, and the system displays 1.0.6 after installation. The so-called 1.5.1 version is nowhere to be found online, and I only downloaded a 1.0.5 version. Installing this old version on the two bad computers (the system displays 1.0.5, but About is still Unknown) allows me to open local links, but there are shortcomings in other functions, making it unpleasant to use. After that, I frequently tried to run various installation files from the official website and the program directory's updater, but they only upgraded the system version to 1.0.6, the About version remained Unknown, and the problem persisted.

Going back to 1.0.5 made me unhappy, and going back to 1.0.6 made me unwilling... and so on.

Relief#

Today, I searched for the settings file in the software installation directory, comparing the differences between the old and new versions, thinking that maybe I could transfer a certain statement from the good version's file to solve the problem.

When I looked at the .log file, I found that it was actually trying to update automatically on a regular basis, but for some reason, it always interrupted. I tried opening the URL, and among a bunch of characters, there was a 1.5.1*.gz file. I was delighted: "1.5.1", isn't that the version number displayed by the good computer's software!

I downloaded it. I found out that 7zip can extract .gz files, so I extracted the .asar file. Then I searched and downloaded a program to extract .asar files, and extracted many files. But when I looked at them, I couldn't make sense of them.

I fell into a deadlock again, with no solution in sight.

Helplessly, I upgraded the .net version and tried clicking on the link again, only to be disappointed by the same error prompt. As I scanned through it again, I saw the ".asar" file! Following the detailed path listed, I found the file in the resource folder. The file name is the same as the extracted .asar file, but without the version number 1.5.1, and the file size is almost the same, only 1kb difference.

I quickly backed up and replaced it, started again, and clicked! The error prompt didn't appear!! The file opened!!!

Following the same steps, I quickly updated the other bad computer as well. It was so satisfying!

Afterword#

Finally, it should be noted that the software's About section did not change, it is not 1.5.1, and it may have made changes to other files during the online update.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.