Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: the archive does not exit: #20

Open
valery-lavrik opened this issue Jan 13, 2022 · 2 comments
Open

Error: the archive does not exit: #20

valery-lavrik opened this issue Jan 13, 2022 · 2 comments

Comments

@valery-lavrik
Copy link

valery-lavrik commented Jan 13, 2022

I use react-native-document-picker to get the path to the file:

	DocumentPicker.pickMultiple({
		type: ['application/zip', 'application/octet-stream'],
		copyTo: 'cachesDirectory',
	}).then((res) => {
		...
		...
		...
	})

The path is correct and another library (react-native-zip-archive) works fine with it.
But I want to unzip the rar archives too. I connected your library and I get the error: Error: the archive does not exit:

Why does it work and yours gives an error?

	let UNZIP_RES = false;
	try {
		// UNZIP_RES = await unzip(CBR.fileCopyUri, CBR_DIR); // zip only

		// zip rar cbr cbz
		UNZIP_RES = await Uncompress.extract({
			filePath: CBR.fileCopyUri,  //  file:///data/user/0/com.lavrik_comics/cache/006672d6-30ed-4fc5-9c20-d568544a28d3/21497-_4.cbr
			destination: CBR_DIR,
		});

	} catch (error) {
		console.log('unzip error', CBR.fileCopyUri, ' -> ', CBR_DIR,  error);
	}

image

@valery-lavrik
Copy link
Author

react-native-document-picker gives different options for paths to the file:

fileCopyUri: "file:///data/user/0/com.lavrik_comics/cache/c5118c91-36d2-402f-8c98-74daa4f70a67/21497-_4.cbr"
fileCopyUriLite: "/data/user/0/com.lavrik_comics/cache/c5118c91-36d2-402f-8c98-74daa4f70a67/21497-_4.cbr"
name: "21497-_4.cbr"
size: 11455057
type: "application/zip"
uri: "content://com.android.providers.downloads.documents/document/34"

I tried everything - it didn't help...

@valery-lavrik
Copy link
Author

It seems the project is dead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant