mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Handle "Controlled Folder Access" Windows crap
This commit is contained in:
@@ -58,6 +58,17 @@ export async function initSentry(app) {
|
|||||||
error.message.includes('404') ||
|
error.message.includes('404') ||
|
||||||
error.message.includes('500') ||
|
error.message.includes('500') ||
|
||||||
error.message.includes('503') ||
|
error.message.includes('503') ||
|
||||||
|
error.message.includes('No such host is known') ||
|
||||||
|
error.message.includes(
|
||||||
|
'The SSL connection could not be established'
|
||||||
|
) ||
|
||||||
|
error.message.includes('A connection attempt failed') ||
|
||||||
|
error.message.includes(
|
||||||
|
'no data of the requested type was found'
|
||||||
|
) ||
|
||||||
|
error.message.includes(
|
||||||
|
'An error occurred while sending the request'
|
||||||
|
) ||
|
||||||
error.message.includes('database or disk is full') ||
|
error.message.includes('database or disk is full') ||
|
||||||
error.message.includes(
|
error.message.includes(
|
||||||
'There is not enough space on the disk.'
|
'There is not enough space on the disk.'
|
||||||
|
|||||||
@@ -33,6 +33,16 @@ class SQLiteService {
|
|||||||
}
|
}
|
||||||
).catch(() => {});
|
).catch(() => {});
|
||||||
}
|
}
|
||||||
|
if (e.message.includes('database is locked')) {
|
||||||
|
ElMessageBox.alert(
|
||||||
|
'Please close other applications that might be using the database file.',
|
||||||
|
'Database is locked',
|
||||||
|
{
|
||||||
|
confirmButtonText: 'OK',
|
||||||
|
type: 'warning'
|
||||||
|
}
|
||||||
|
).catch(() => {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
import { reactive, ref, shallowReactive, watch } from 'vue';
|
import { reactive, ref, shallowReactive, watch } from 'vue';
|
||||||
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import Noty from 'noty';
|
import Noty from 'noty';
|
||||||
|
|
||||||
|
import {
|
||||||
|
getEmojiFileName,
|
||||||
|
getPrintFileName,
|
||||||
|
getPrintLocalDate,
|
||||||
|
openExternalLink
|
||||||
|
} from '../shared/utils';
|
||||||
import {
|
import {
|
||||||
inventoryRequest,
|
inventoryRequest,
|
||||||
userRequest,
|
userRequest,
|
||||||
vrcPlusIconRequest,
|
vrcPlusIconRequest,
|
||||||
vrcPlusImageRequest
|
vrcPlusImageRequest
|
||||||
} from '../api';
|
} from '../api';
|
||||||
import {
|
|
||||||
getEmojiFileName,
|
|
||||||
getPrintFileName,
|
|
||||||
getPrintLocalDate
|
|
||||||
} from '../shared/utils';
|
|
||||||
import { AppDebug } from '../service/appConfig';
|
import { AppDebug } from '../service/appConfig';
|
||||||
import { handleImageUploadInput } from '../shared/utils/imageUpload';
|
import { handleImageUploadInput } from '../shared/utils/imageUpload';
|
||||||
import { useAdvancedSettingsStore } from './settings/advanced';
|
import { useAdvancedSettingsStore } from './settings/advanced';
|
||||||
@@ -487,16 +489,38 @@ export const useGalleryStore = defineStore('Gallery', () => {
|
|||||||
const createdAt = args.json.created_at;
|
const createdAt = args.json.created_at;
|
||||||
const monthFolder = createdAt.slice(0, 7);
|
const monthFolder = createdAt.slice(0, 7);
|
||||||
|
|
||||||
const filePath = await AppApi.SaveEmojiToFile(
|
try {
|
||||||
imageUrl,
|
const filePath = await AppApi.SaveEmojiToFile(
|
||||||
advancedSettingsStore.ugcFolderPath,
|
imageUrl,
|
||||||
monthFolder,
|
advancedSettingsStore.ugcFolderPath,
|
||||||
emojiFileName
|
monthFolder,
|
||||||
);
|
emojiFileName
|
||||||
if (filePath) {
|
|
||||||
console.log(
|
|
||||||
`Emoji saved to file: ${monthFolder}\\${emojiFileName}`
|
|
||||||
);
|
);
|
||||||
|
if (filePath) {
|
||||||
|
console.log(
|
||||||
|
`Emoji saved to file: ${monthFolder}\\${emojiFileName}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e.message.includes('Could not find file')) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
'Windows has blocked VRCX from creating files on your system. Please allow VRCX to create files to save emojis, would you like to see instructions on how to fix this?',
|
||||||
|
'Failed to create emoji folder',
|
||||||
|
{
|
||||||
|
confirmButtonText: 'Confirm',
|
||||||
|
cancelButtonText: 'Ignore',
|
||||||
|
type: 'warning'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(async (action) => {
|
||||||
|
if (action !== 'confirm') return;
|
||||||
|
openExternalLink(
|
||||||
|
'https://www.youtube.com/watch?v=1mwmmCdA4D8&t=213s'
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
console.error('Failed to save emoji to file:', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.instanceInventoryQueue.length === 0) {
|
if (state.instanceInventoryQueue.length === 0) {
|
||||||
|
|||||||
@@ -150,11 +150,12 @@ export const useLaunchStore = defineStore('Launch', () => {
|
|||||||
if (desktopMode) {
|
if (desktopMode) {
|
||||||
args.push('--no-vr');
|
args.push('--no-vr');
|
||||||
}
|
}
|
||||||
if (vrcLaunchPathOverride && !LINUX) {
|
try {
|
||||||
AppApi.StartGameFromPath(
|
if (vrcLaunchPathOverride && !LINUX) {
|
||||||
vrcLaunchPathOverride,
|
const result = await AppApi.StartGameFromPath(
|
||||||
args.join(' ')
|
vrcLaunchPathOverride,
|
||||||
).then((result) => {
|
args.join(' ')
|
||||||
|
);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message:
|
message:
|
||||||
@@ -167,9 +168,8 @@ export const useLaunchStore = defineStore('Launch', () => {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
} else {
|
const result = await AppApi.StartGame(args.join(' '));
|
||||||
AppApi.StartGame(args.join(' ')).then((result) => {
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message:
|
message:
|
||||||
@@ -182,6 +182,12 @@ export const useLaunchStore = defineStore('Launch', () => {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
ElMessage({
|
||||||
|
message: `Failed to launch VRChat: ${e.message}`,
|
||||||
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log('Launch Game', args.join(' '), desktopMode);
|
console.log('Launch Game', args.join(' '), desktopMode);
|
||||||
|
|||||||
Reference in New Issue
Block a user