fix bugs
This commit is contained in:
parent
36eab8c71b
commit
e929cd95b1
|
@ -176,12 +176,11 @@ export default function Upload(props: Props) {
|
||||||
function analyseUploadFiles(): AnalysisResult {
|
function analyseUploadFiles(): AnalysisResult {
|
||||||
if (
|
if (
|
||||||
isElectron() &&
|
isElectron() &&
|
||||||
(desktopUploadType.current === DESKTOP_UPLOAD_TYPE.FILES ||
|
(!desktopUploadType.current ||
|
||||||
!desktopUploadType.current)
|
desktopUploadType.current === DESKTOP_UPLOAD_TYPE.FILES)
|
||||||
) {
|
) {
|
||||||
return NULL_ANALYSIS_RESULT;
|
return NULL_ANALYSIS_RESULT;
|
||||||
}
|
}
|
||||||
desktopUploadType.current = null;
|
|
||||||
|
|
||||||
const paths: string[] = toUploadFiles.current.map(
|
const paths: string[] = toUploadFiles.current.map(
|
||||||
(file) => file['path']
|
(file) => file['path']
|
||||||
|
@ -387,10 +386,10 @@ export default function Upload(props: Props) {
|
||||||
if (isPendingDesktopUpload.current) {
|
if (isPendingDesktopUpload.current) {
|
||||||
isPendingDesktopUpload.current = false;
|
isPendingDesktopUpload.current = false;
|
||||||
if (pendingDesktopUploadCollectionName.current) {
|
if (pendingDesktopUploadCollectionName.current) {
|
||||||
pendingDesktopUploadCollectionName.current = null;
|
|
||||||
uploadToSingleNewCollection(
|
uploadToSingleNewCollection(
|
||||||
pendingDesktopUploadCollectionName.current
|
pendingDesktopUploadCollectionName.current
|
||||||
);
|
);
|
||||||
|
pendingDesktopUploadCollectionName.current = null;
|
||||||
} else {
|
} else {
|
||||||
uploadFilesToNewCollections(
|
uploadFilesToNewCollections(
|
||||||
UPLOAD_STRATEGY.COLLECTION_PER_FOLDER
|
UPLOAD_STRATEGY.COLLECTION_PER_FOLDER
|
||||||
|
|
Loading…
Reference in a new issue