mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Currentの確認処理を修正
This commit is contained in:
parent
ce834a7cfd
commit
1a31d63786
|
@ -100,7 +100,15 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
|
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
|
||||||
|
|
||||||
// FileManager
|
// FileManager
|
||||||
|
if (this.fileManager.getCurrentDir().equals(this.documentRootPath.resolve(DEFAULT_SAVE_DIR))) { // TODO-rca: 効率化
|
||||||
|
logger.debug("addNewPageToLast", "currentDir is documentRootPath");
|
||||||
|
} else {
|
||||||
|
logger.debug("addNewPageToLast", "currentDir is not documentRootPath");
|
||||||
|
this.fileManager.backRootDir();
|
||||||
this.fileManager.autoCreateDir(DEFAULT_SAVE_DIR);
|
this.fileManager.autoCreateDir(DEFAULT_SAVE_DIR);
|
||||||
|
this.fileManager.changeDir(DEFAULT_SAVE_DIR);
|
||||||
|
}
|
||||||
|
logger.debug("addNewPageToLast", "DirInit finished");
|
||||||
|
|
||||||
// Save file
|
// Save file
|
||||||
this.fileManager.saveBitmapAtCurrent(bitmap, filename);
|
this.fileManager.saveBitmapAtCurrent(bitmap, filename);
|
||||||
|
@ -114,10 +122,11 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addNewPagesToLast(Bitmap[] bitmaps) {
|
public void addNewPagesToLast(Bitmap[] bitmaps) {
|
||||||
logger.debug("addNewPagesToLast(List)", "called");
|
logger.debug("addNewPagesToLast", "called");
|
||||||
for(Bitmap bitmap : bitmaps) {
|
|
||||||
|
for (Bitmap bitmap : bitmaps) {
|
||||||
addNewPageToLast(bitmap);
|
addNewPageToLast(bitmap);
|
||||||
} // TODO-rca: 保存処理をまとめて行う?
|
} // TODO-rca: 効率悪いので改善する
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user