文件默认路径
This commit is contained in:
parent
dbd9fcf617
commit
2fc90e694d
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue