mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
Extracted out shortcut extension constant
This commit is contained in:
@@ -6,7 +6,7 @@ import { useFileSystem } from 'contexts/fileSystem';
|
||||
import ini from 'ini';
|
||||
import { extname } from 'path';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { IMAGE_FILE_EXTENSIONS } from 'utils/constants';
|
||||
import { IMAGE_FILE_EXTENSIONS, SHORTCUT_EXTENSION } from 'utils/constants';
|
||||
import { bufferToUrl } from 'utils/functions';
|
||||
|
||||
type FileInfo = {
|
||||
@@ -45,7 +45,7 @@ const useFileInfo = (path: string): FileInfo => {
|
||||
url: path
|
||||
});
|
||||
|
||||
if (extension === '.url') {
|
||||
if (extension === SHORTCUT_EXTENSION) {
|
||||
fs.readFile(path, (error, contents = Buffer.from('')) => {
|
||||
if (error) {
|
||||
getInfoByFileExtension();
|
||||
|
||||
@@ -41,4 +41,6 @@ export const MILLISECONDS_IN_SECOND = 1000;
|
||||
|
||||
export const PROCESS_DELIMITER = '__';
|
||||
|
||||
export const SHORTCUT_EXTENSION = '.url';
|
||||
|
||||
export const WINDOW_TRANSITION_DURATION_IN_MILLISECONDS = 250;
|
||||
|
||||
Reference in New Issue
Block a user