TagSpaces is an offline, open source, document manager with tagging support
skip choose file icon for S3 new note dialog && path fix (#764)
Stanimir324612527afb
diff --git a/app/components/dialogs/CreateFileDialog.js b/app/components/dialogs/CreateFileDialog.jsindex 937ca35a6..1fceab9c3 100644--- a/app/components/dialogs/CreateFileDialog.js+++ b/app/components/dialogs/CreateFileDialog.js@@ -46,6 +46,7 @@ import { formatDateTime4Tag } from '../../utils/misc';import AppConfig from '../../config';import TaggingActions from '../../reducers/tagging-actions';import { actions as AppActions } from '../../reducers/app';+import PlatformIO from '../../services/platform-io';const styles = theme => ({root: {@@ -292,11 +293,12 @@ class CreateFileDialog extends React.Component<Props, State> {value={this.state.selectedDirectoryPath}onChange={this.handleInputChange}endAdornment={- <InputAdornment position="end" style={{ height: 32 }}>- <IconButton onClick={this.openFolderChooser}>- <FolderIcon className={this.props.classes.folderIcon} />- </IconButton>- </InputAdornment>+ PlatformIO.haveObjectStoreSupport() ? undefined :+ (<InputAdornment position="end" style={{ height: 32 }}>+ <IconButton onClick={this.openFolderChooser}>+ <FolderIcon className={this.props.classes.folderIcon} />+ </IconButton>+ </InputAdornment>)}/>{this.state.errorTextPath && <FormHelperText>{i18n.t('core:invalidPath')}</FormHelperText>}diff --git a/app/reducers/app.js b/app/reducers/app.jsindex 9b63e421e..9c56537e4 100644--- a/app/reducers/app.js+++ b/app/reducers/app.js@@ -37,7 +37,7 @@ import {getMetaFileLocationForFile,getThumbFileLocationForFile,extractParentDirectoryPath,- extractTagsAsObjects+ extractTagsAsObjects, normalizePath} from '../utils/paths';import { sortByCriteria, formatDateTime4Tag } from '../utils/misc';import i18n from '../services/i18n';@@ -874,7 +874,7 @@ export const actions = {getState: () => Object) => {const fileNameAndExt = fileName + '.' + fileType;- const filePath = targetPath + AppConfig.dirSeparator + fileNameAndExt;+ const filePath = normalizePath(targetPath) + AppConfig.dirSeparator + fileNameAndExt;let fileContent = content;if (fileType === 'html') {const newHTMLFileContent = getState().settings.newHTMLFileContent;diff --git a/app/utils/paths.js b/app/utils/paths.jsindex e8209addf..f37b7c46c 100644--- a/app/utils/paths.js+++ b/app/utils/paths.js@@ -51,8 +51,7 @@ export function extractFileExtension(filePath: string) {}export function getMetaDirectoryPath(directoryPath: string) {- const metaFolder = directoryPath + AppConfig.dirSeparator + AppConfig.metaFolder;- return metaFolder;+ return normalizePath(directoryPath) + AppConfig.dirSeparator + AppConfig.metaFolder;}export function getMetaFileLocationForFile(entryPath: string) {