Erreur de conversion d'archive V1 vers V2 lors du transfert depuis le repertoire /tmp (fonction Files.move)
See original GitHub issueDescribe the bug Erreur systèmatique lors de la conversion de l’archive au format v2 qui n’aboutit jamais. (voir log d’erreur)
To Reproduce sur un système linux avec partition /tmp séparée de la /home. avec un histoire déjà crée, lors du click sur le bouton “convertir cette histoire au format FS (v2.x)”
Expected behavior
D’après les logs d’erreur ça plante sur at studio.webui.service.LibraryService.addConvertedFsPackFile(LibraryService.java:314)
Files.move(folderPath, destinationPath);
Dans mon cas le déplacement doit se faire depuis la partition /tmp vers la partition /home. Or d’après la doc java:
You can move a file or directory by using the move(Path, Path, CopyOption…) method. The move fails if the target file exists, unless the REPLACE_EXISTING option is specified.
Empty directories can be moved. If the directory is not empty, the move is allowed when the directory can be moved without moving the contents of that directory. On UNIX systems, moving a directory within the same partition generally consists of renaming the directory. In that situation, this method works even when the directory contains files.
Étant donnée que le déplacement doit se faire depuis une partition (/tmp) vers une autre (/home) il est normal que le transfert échoue.
Logs 2021-03-18 19:30:49,647 [FINEST] [s.d.f.FsStoryTellerAsyncDriver]: Reading packs index from file: /media/thom/disk/.pi 2021-03-18 19:30:49,647 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Number of packs in index: 3 2021-03-18 19:30:49,648 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Pack UUID: c8b39950-de17-4eaa-8e85-2a07fc468267 2021-03-18 19:30:49,657 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Pack version: 1 2021-03-18 19:30:49,665 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Pack UUID: d489f67b-0e51-4669-b1e1-1555f3c18541 2021-03-18 19:30:49,666 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Pack version: 1 2021-03-18 19:30:49,668 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Pack UUID: c4139d59-872a-4d15-8cf1-76d34cdf38c6 2021-03-18 19:30:49,668 [DEBUG] [s.d.f.FsStoryTellerAsyncDriver]: Pack version: 2 2021-03-18 19:30:52,963 [INFO ] [s.w.s.LibraryService]: Pack to transfer is in archive format. Converting to FS format and storing in temporary folder: /tmp/les_histoires_de_petit_cheval-f54fd85d-c87f-4a11-b22e-738790ffbd8d-v1.zip7670982598273133980 2021-03-18 19:30:52,965 [INFO ] [s.w.s.LibraryService]: Reading archive format pack 2021-03-18 19:30:52,984 [INFO ] [s.w.s.LibraryService]: Converting assets if necessary 2021-03-18 19:30:52,995 [DEBUG] [s.c.v.u.PackAssetsCompression]: Converting image asset into 4-bits/RLE BMP 2021-03-18 19:30:53,139 [DEBUG] [s.c.v.u.ID3Tags]: Removing ID3v2 tag at beginning of file (1034 bytes). 2021-03-18 19:30:53,224 [DEBUG] [s.c.v.u.ID3Tags]: Removing ID3v2 tag at beginning of file (1034 bytes). 2021-03-18 19:30:53,248 [DEBUG] [s.c.v.u.ID3Tags]: Removing ID3v2 tag at beginning of file (1034 bytes). 2021-03-18 19:30:53,251 [DEBUG] [s.c.v.u.PackAssetsCompression]: Converting image asset into 4-bits/RLE BMP 2021-03-18 19:30:53,366 [DEBUG] [s.c.v.u.ID3Tags]: Removing ID3v2 tag at beginning of file (1034 bytes). 2021-03-18 19:30:53,377 [INFO ] [s.w.s.LibraryService]: Writing FS format pack 2021-03-18 19:30:53,471 [INFO ] [s.w.s.LibraryService]: Moving FS format pack into local library: /home/thom/.studio/library/f54fd85d-c87f-4a11-b22e-738790ffbd8d.converted_1616092253467 2021-03-18 19:30:53,472 [ERROR] [s.w.s.LibraryService]: Failed to convert archive format pack to FS format java.nio.file.DirectoryNotEmptyException: /tmp/les_histoires_de_petit_cheval-f54fd85d-c87f-4a11-b22e-738790ffbd8d-v1.zip7670982598273133980/90FFBD8D at java.base/sun.nio.fs.UnixCopyFile.ensureEmptyDir(UnixCopyFile.java:382) at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:482) at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:267) at java.base/java.nio.file.Files.move(Files.java:1426) at studio.webui.service.LibraryService.addConvertedFsPackFile(LibraryService.java:314) at studio.webui.api.LibraryController$2.run(LibraryController.java:103) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506)
Desktop and environment (please complete the following information):
- OS: linux (ubuntu 20.04)
- Browser firefox
- Java version: openjdk-14
- Maven version: 3.6.3-1
- STUdio application version (0.3.0-beta.3-SNAPSHOT)
Additional context partition /tmp séparée de la partition /home
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@marian-m12l 👍 same for me ! t’s working great. perfect !
@marian-m12l It’s working great for me! Thanks @marian-m12l and @kollibar.