File tree Expand file tree Collapse file tree
src/main/java/io/github/talelin/merak/extensions/file Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ public void initStoreDir() {
2525
2626 @ Override
2727 protected boolean handleOneFile (byte [] bytes , String newFilename ) {
28- String storePath = getStorePath (newFilename );
28+ String absolutePath =
29+ FileUtil .getFileAbsolutePath (fileProperties .getStoreDir (), getStorePath (newFilename ));
2930 try {
3031 BufferedOutputStream stream =
31- new BufferedOutputStream (new FileOutputStream (new java .io .File (storePath )));
32+ new BufferedOutputStream (new FileOutputStream (new java .io .File (absolutePath )));
3233 stream .write (bytes );
3334 stream .close ();
3435 } catch (Exception e ) {
@@ -46,7 +47,7 @@ protected FileProperties getFileProperties() {
4647
4748 @ Override
4849 protected String getStorePath (String newFilename ) {
49- return FileUtil . getFileAbsolutePath ( fileProperties . getStoreDir (), newFilename ) ;
50+ return newFilename ;
5051 }
5152
5253 @ Override
You can’t perform that action at this time.
0 commit comments