cask
                                
                                
                                
                                    cask copied to clipboard
                            
                            
                            
                        Avoid panic when access to existing file
Hello, bit wonder of asking cause it seems not being maintained...
When trying to use this module, creating DB works well, but it fails when trying to access existing database as:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 17, kind: AlreadyExists, message: "File exists" })', src/...
I've tried both as
let cask_db = CaskOptions::default()
            .compaction_check_frequency(1200)
            .sync(SyncStrategy::Interval(5000))
            .max_file_size(1024 * 1024 * 1024)
            .open("test.db").unwrap();
and
let cask_opt = CaskOptions::default();
let cask_db = Cask::open("test.db", cask_opt).unwrap();
Is there a correct way to read existing database?
You are right that is not actively maintained and you shouldn't use this in any kind of production scenario.
That aside, I have tried this and couldn't replicate the panic. Maybe you could re-run with RUST_BACKTRACE=1? I tested this on Linux, what OS are you using?
@andresilva I'm testing on Mac(M1)