mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 23:45:11 +01:00
fix(importer): hardlink fails inside docker
docker does not support hardlinks between different mounts fallback to copy in that case
This commit is contained in:
parent
7650050fe1
commit
24cf1819b0
1 changed files with 2 additions and 2 deletions
|
|
@ -85,8 +85,8 @@ class BookImporter(
|
|||
CopyMode.HARDLINK -> try {
|
||||
logger.info { "Hardlink file $sourceFile to $destFile" }
|
||||
Files.createLink(destFile, sourceFile)
|
||||
} catch (e: UnsupportedOperationException) {
|
||||
logger.warn { "Filesystem does not support hardlinks, copying instead" }
|
||||
} catch (e: Exception) {
|
||||
logger.warn(e) { "Filesystem does not support hardlinks, copying instead" }
|
||||
sourceFile.copyTo(destFile)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue