File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
core/src/main/java/dev/keva/core/aof Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,16 @@ public void init() {
3333 FileOutputStream fos = new FileOutputStream (getWorkingDir () + "keva.aof" , true );
3434 output = isExists ? new AppendOnlyObjectOutputStream (fos ) : new ObjectOutputStream (fos );
3535 } catch (IOException e ) {
36- log .error ("Error creating AOF file" , e );
36+ if (e instanceof FileNotFoundException ) {
37+ log .info ("AOF file not found, creating new file..." );
38+ if (e .getMessage ().contains ("Permission denied" )) {
39+ log .error ("Permission denied to access AOF file, please check your file permissions" );
40+ System .exit (1 );
41+ }
42+ } else {
43+ log .error ("Error writing to AOF file" , e );
44+ System .exit (1 );
45+ }
3746 }
3847
3948 if (kevaConfig .getAofInterval () != 0 ) {
You can’t perform that action at this time.
0 commit comments