TagSpaces is an offline, open source, document manager with tagging support
TSN197-fixes
Stanimir Marinovfaf3bdefebb8
diff --git a/app/components/LocationManager.js b/app/components/LocationManager.jsindex 17b185e1e..e34d79225 100644--- a/app/components/LocationManager.js+++ b/app/components/LocationManager.js@@ -191,7 +191,7 @@ class LocationManager extends React.Component<Props, State> {.then(dirEntries => {const directoryContent = [];dirEntries.map(entry => {- if (entry.name === AppConfig.metaFolder) { // TODO !settings.showUnixHiddenEntries &&+ if (entry.name === AppConfig.metaFolder || entry.name.endsWith('/' + AppConfig.metaFolder)) { // TODO !settings.showUnixHiddenEntries &&return true;}// const enhancedEntry = enhanceEntry(entry);diff --git a/app/components/dialogs/MoveCopyFilesDialog.js b/app/components/dialogs/MoveCopyFilesDialog.jsindex 3c008f876..b14ae5135 100644--- a/app/components/dialogs/MoveCopyFilesDialog.js+++ b/app/components/dialogs/MoveCopyFilesDialog.js@@ -152,14 +152,15 @@ class MoveCopyFilesDialog extends React.Component<Props, State> {onChange={e => this.handleInputChange(e)}value={this.state.targetPath}endAdornment={- <InputAdornment position="end" style={{ height: 33 }}>- <IconButton- data-tid="openDirectoryMoveCopyDialog"- onClick={this.selectDirectory}- >- <FolderIcon />- </IconButton>- </InputAdornment>+ PlatformIO.haveObjectStoreSupport() ? undefined :+ (<InputAdornment position="end" style={{ height: 33 }}>+ <IconButton+ data-tid="openDirectoryMoveCopyDialog"+ onClick={this.selectDirectory}+ >+ <FolderIcon />+ </IconButton>+ </InputAdornment>)}/>{this.state.inputError && <FormHelperText>Empty Input Field</FormHelperText>}diff --git a/app/services/platform-io.js b/app/services/platform-io.jsindex 6495b3691..5c69abb4b 100644--- a/app/services/platform-io.js+++ b/app/services/platform-io.js@@ -42,11 +42,13 @@ export default class PlatformIO {} else {console.log('ObjectStore support available in the PRO version');}- }+ };static disableObjectStoreSupport = (): void => {objectStoreAPI = undefined;- }+ };++ static haveObjectStoreSupport = (): boolean => objectStoreAPI !== undefined;static initMainMenu = (menuConfig: Array<Object>): void => {if (nativeAPI.initMainMenu) {@@ -54,7 +56,7 @@ export default class PlatformIO {} else {console.log('initMainMenu not supported');}- }+ };static initTrayMenu = (menuConfig: Array<Object>): void => {if (nativeAPI.initTrayMenu) {diff --git a/app/utils/paths.js b/app/utils/paths.jsindex bb6482d9f..e8209addf 100644--- a/app/utils/paths.js+++ b/app/utils/paths.js@@ -90,6 +90,15 @@ export function cleanTrailingDirSeparator(dirPath: string): string {return '';}+/**+ *+ * @param path -> root//subFolder/+ * @returns {string} -> root/subFolder+ */+export function normalizePath(path: string): string {+ return cleanTrailingDirSeparator(path.replace(/\/\//g, '/'));+}+export function extractFileNameWithoutExt(filePath: string): string {const fileName = extractFileName(filePath);const indexOfDot = fileName.lastIndexOf('.');