Comments (8)
Hi!
Could you provide some sample code to replicate the issues you described?
If compressed memory variables are used for decompression, the directory where the program is located will be opened, causing an exception in the fs object
If I understand correctly, are you extracting an archive from a memory buffer to the filesystem?
If decompressing compressed packages in the fat32 or exfat file system can also cause fs object exceptions
Just to make sure I understood correctly: you're extracting archives to fat32 and exFAT filesystems, right? What archive format are you trying to extract?
Our project's development environment is VS2017 and C++17, which may encounter the above issues. After our testing, using VS2019 or later versions and C++17 will not cause such problems.
This makes me think that it might be some bug in the std::filesystem implementation of VS2017, as bit7z internally uses it for things like paths.
But I'll need more information to understand the cause of the issue.
Thank you for any further info you can provide!
from bit7z.
-
When decompressing from stream to stream, fs will be used to open the directory where the current executing program is located (i.e.‘./’). If the current executing program is stored in the FAT32 or exFAT file system, an exception will occur
-
If the compressed file to be decompressed exists in the FAT32 or exFAT file system, or if it needs to be decompressed to FAT32 or exFAT, an fs exception will occur
The above error triggering condition is VS2017 C++17. If the development changes the environment to VS2019 or higher, this issue will not occur
from bit7z.
Thanks for the further details!
I was able to replicate the issue; I'm working on a fix.
Implementing it might take some time, as it will likely require a bit of refactoring, but I'll release it as soon as possible!
from bit7z.
Hi @psvajaz! Yesterday, I pushed a commit to the hotfix/v4.0.5
branch that should fix the issue.
If you can test it, it would really be helpful!
Thank you in advance!
from bit7z.
@rikyoz
After testing:
-
Compressed packages saved in FAT32 or exFAT file systems can be decompressed to NTFS, FAT32, and exFAT file systems as usual.
-
Can compress and output regular files in NTFS to FAT32 and exFAT file systems
-
The compressed file cannot be loaded properly in the file system of FAT32 or exFAT, causing the compression process to fail. The specific compression error location is shown in the following figure:
fsitem.cpp
from bit7z.
Ok, so the fix was only partial. Thanks for the further tests!
The compressed file cannot be loaded properly in the file system of FAT32 or exFAT, causing the compression process to fail. The specific compression error location is shown in the following figure:
fsitem.cpp
Unfortunately, it seems to be a bug in old versions of MSVC (microsoft/STL#233).
I'm working on finding a possible workaround.
from bit7z.
@psvajaz
I just pushed a commit to the branch hotfix/v4.0.5
with a workaround for the bug.
Now, you can pass the BIT7Z_DISABLE_USE_STD_FILESYSTEM
option when configuring bit7z.
This will force the library to always use the ghc::filesystem
library instead of the std::filesystem
provided by the compiler.
From my tests, this library doesn't suffer from the same bug as MSVC's std::filesystem and seems to fix the issue.
Please let me know if this works for you, too!
from bit7z.
After extensive testing, the bug has been fixed. thanks
from bit7z.
Related Issues (20)
- [Bug]: Errors related to file compression HOT 4
- [Feature Request]: Can you provide a method for setting the file time HOT 1
- [build-error]: Failed to open the archive file: No such process HOT 2
- [Bug]: UpdateMode::Update not working as expected, throwing exception HOT 3
- [Feature Request]: Creation or extraction archive file in one line HOT 1
- [Feature Request]: Support for compressed packages in four formats: ace, img, uue, and war HOT 2
- [Feature Request]: Extracting files whose names contain forbidden characters HOT 1
- Do I need to build 7zip myself? HOT 6
- [Bug]:
- [Bug]: Multiple Definition Linker Error for IID_IUnknown HOT 10
- [Bug]: BIT7Z_DISABLE_USE_STD_FILESYSTEM not working HOT 4
- [Bug]: Compile error when bit7z.lib is introduced into the project. HOT 11
- [Feature Request]: Is "tstring_to_path" forgotten here? HOT 1
- [Bug]: HOT 3
- [Feature Request]: Compresses files open for writing by another applications HOT 1
- [Bug]: CreateObject 函数调用异常
- [Bug]: core dump with BitArchiveWriter HOT 9
- [Bug]: Some zip file names are garbled HOT 5
- [Bug]: HOT 3
- [Possible Bug]: BitArchiveReader::items is slow? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bit7z.