mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-30 07:21:32 -07:00
Fix Windows mpv logging and add log export (#88)
This commit is contained in:
@@ -139,9 +139,10 @@ export async function updateAppImageFromRelease(options: {
|
||||
};
|
||||
}
|
||||
|
||||
const tempPath = path.join(
|
||||
path.dirname(options.appImagePath),
|
||||
`.${path.basename(options.appImagePath)}.update`,
|
||||
const appImagePathApi = options.appImagePath.startsWith('/') ? path.posix : path;
|
||||
const tempPath = appImagePathApi.join(
|
||||
appImagePathApi.dirname(options.appImagePath),
|
||||
`.${appImagePathApi.basename(options.appImagePath)}.update`,
|
||||
);
|
||||
try {
|
||||
await fsDeps.writeFile(tempPath, data);
|
||||
|
||||
@@ -63,7 +63,7 @@ test('buildProtectedSupportAssetsCommand cleans up temporary extraction director
|
||||
|
||||
test('updateSupportAssetsFromRelease updates only the Linux rofi theme', async () => {
|
||||
const xdgDataHome = fs.mkdtempSync(path.join(os.tmpdir(), 'subminer-xdg-data-'));
|
||||
const dataDir = path.join(xdgDataHome, 'SubMiner');
|
||||
const dataDir = path.posix.join(xdgDataHome, 'SubMiner');
|
||||
fs.mkdirSync(path.join(dataDir, 'themes'), { recursive: true });
|
||||
fs.mkdirSync(path.join(dataDir, 'plugin/subminer'), { recursive: true });
|
||||
fs.writeFileSync(path.join(dataDir, 'themes/subminer.rasi'), 'old theme\n');
|
||||
|
||||
@@ -30,8 +30,12 @@ export function detectSupportAssetDataDirs(options: {
|
||||
xdgDataHome?: string;
|
||||
}): string[] {
|
||||
if (options.platform === 'linux') {
|
||||
const xdgDataHome = options.xdgDataHome || path.join(options.homeDir, '.local/share');
|
||||
return [path.join(xdgDataHome, 'SubMiner'), '/usr/local/share/SubMiner', '/usr/share/SubMiner'];
|
||||
const xdgDataHome = options.xdgDataHome || path.posix.join(options.homeDir, '.local/share');
|
||||
return [
|
||||
path.posix.join(xdgDataHome, 'SubMiner'),
|
||||
'/usr/local/share/SubMiner',
|
||||
'/usr/share/SubMiner',
|
||||
];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user