From 2fc90e694dd34ba5ae35c127fbaf315372dc2824 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 8 Aug 2024 17:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=BB=98=E8=AE=A4=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/StupWizard/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/StupWizard/index.tsx b/src/components/StupWizard/index.tsx index 91ede85..58b8c91 100644 --- a/src/components/StupWizard/index.tsx +++ b/src/components/StupWizard/index.tsx @@ -5,7 +5,7 @@ import { useState, useImperativeHandle, forwardRef, useEffect } from "react"; import agora from '@/utils/package/agora' import { CloseOutlined, LoadingOutlined } from '@ant-design/icons'; import { storage } from '@/utils'; -const os = require('os') +import path from 'path'; const fs = require('fs').promises; const { exec } = require('child_process'); const StupWizard = forwardRef((props: any, ref: any) => { @@ -379,7 +379,7 @@ const RecordingComponents = () => { useEffect(() => { const setting = JSON.parse(storage.getItem('setting') as string) if (!setting.recordingFilesPath) { - setting.recordingFilesPath = `${os.homedir()}\\Desktop\\` + setting.recordingFilesPath = path.dirname(process.execPath) + '\\'; setFilePath(setting.recordingFilesPath) storage.setItem('setting', JSON.stringify(setting)) } else { @@ -448,7 +448,7 @@ const FileComponents = () => { useEffect(() => { const setting = JSON.parse(storage.getItem('setting') as string) if (!setting.shareFilesPath) { - setting.shareFilesPath = `${os.homedir()}\\Desktop\\` + setting.shareFilesPath = path.dirname(process.execPath) + '\\'; setFilePath(setting.shareFilesPath) storage.setItem('setting', JSON.stringify(setting)) } else {