diff --git a/app/main/css.js b/app/main/css.js
index 7ba1ed00..0903642c 100644
--- a/app/main/css.js
+++ b/app/main/css.js
@@ -44,7 +44,7 @@ function css(mainWindow) {
})
ipc.on('theme-json-request', function (e, arg) {
try {
- var themecss = join('./source/themes', arg)
+ var themecss = join(app.getAppPath(), '/source/themes', arg)
var raw = fs.readFileSync(themecss, 'utf8')
var json = JSON5.parse(raw)
} catch {
@@ -56,7 +56,7 @@ function css(mainWindow) {
})
ipc.on('theme-css-request', function (e, arg) {
try {
- var themecss = join('./source/themes', arg)
+ var themecss = join(app.getAppPath(), '/source/themes', arg)
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
} catch {
var themecss = join(app.getPath("userData"), arg)
@@ -227,10 +227,10 @@ function css(mainWindow) {
return css
}
ipc.on('theme-json-list', function (e, arg) {
- var files1 = fs.readdirSync('./source/themes')
+ var files1 = fs.readdirSync(join(app.getAppPath(), '/source/themes'))
var file1List = files1.filter(function (file) {
if (file.match(/\.thedesktheme$/)) {
- var tfile = join('./source/themes', file)
+ var tfile = join(app.getAppPath(), '/source/themes', file)
return fs.statSync(tfile).isFile() && /.*\.thedesktheme$/.test(tfile)
} else {
return null
@@ -238,7 +238,7 @@ function css(mainWindow) {
})
var themes = [];
for (var i = 0; i < file1List.length; i++) {
- var themecss = join('./source/themes', file1List[i]);
+ var themecss = join(app.getAppPath(), '/source/themes', file1List[i]);
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'));
let compat = true
if (json.version) compat = false
diff --git a/app/package.json b/app/package.json
index 21c71519..42a083c8 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
{
"name": "thedesk",
- "version": "21.2.1",
+ "version": "21.2.2",
"codename": "Mayu",
"description": "TheDesk is a Mastodon client for PC.",
"repository": "https://github.com/cutls/TheDesk",
diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html
index ccdd2287..0e086d1c 100644
--- a/app/view/make/index.sample.html
+++ b/app/view/make/index.sample.html
@@ -1123,12 +1123,13 @@
HP
GitHub
-