Closed Harveykang closed 1 year ago
I'll look into it
I'll look into it
thank you ^_^
May I ask what mod adds those scripts?
this mod supplies a script language, similar to datapack in vanilla
check this... https://github.com/FZ-Studio/textile_backup/commit/9518ef9c76e60ce0bf7cd7c6fe5458577020329d just don't delete directories idk why cannot delete the directory..
It should be more like this:
boolean state = true;
if(f.isDirectory()) {
for(File f2 : f.listFiles()) state &= deleteDirectory(f2);
}
return (f.isDirectory() ? true : f.delete()) && state;
Although I can't see how that would work...
The only reason I can think of right now i that maybe those files where somehow write protected. If so have you seen a message saying Something went wrong while deleting old world!
?
i saw that message. but the folder was actually deleted. then the carpet mod will create an empty “scripts” folder on server started.
huh. I suppose that maybe some part of the file gets left which makes it later impossible to restore them...
https://github.com/Szum123321/textile_backup/tree/56-bugfix
Here's a branch where I made it so that files that weren't deleted get logged. Do you know how to build fabric mod?
yeah i know
what the hell..
Well, the game fails to create scripts folder and so the scripts don't get decompressed. Can you check if the folder is write-protected or something?
ok I just found a way to tell exactly what went wrong. Give me a moment, and I'll commit changes to that branch
ok btw, the folder has no write-protection
ok. See 011283dc094e2380e350914b7532c264e745d3f5 Files.createDirectories throws and exception if something goes wrong
[01:55:18] [Textile Backup restore thread nr. 0/ERROR] (textile_backup) [Textile Backup] An exception occurred when trying to create .\world\scripts\here.sc java.nio.file.AccessDeniedException: E:\VSCode Projects\textile_backup-56-bugfix\run.\world\scripts at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) ~[?:1.8.0_181] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[?:1.8.0_181] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) ~[?:1.8.0_181] at sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:504) ~[?:1.8.0_181] at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_181] at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_181] at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_181] at net.szum123321.textile_backup.core.restore.decompressors.ZipDecompressor.decompress(ZipDecompressor.java:61) [textile_backup-2.1.0-prev-1.16-dev.jar:?] at net.szum123321.textile_backup.core.restore.RestoreBackupRunnable.run(RestoreBackupRunnable.java:78) [textile_backup-2.1.0-prev-1.16-dev.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181] [01:55:18] [Textile Backup restore thread nr. 0/ERROR] (textile_backup) [Textile Backup] An exception occurred while trying to decompress file: here.sc java.nio.file.AccessDeniedException: .\world\scripts\here.sc at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) ~[?:1.8.0_181] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[?:1.8.0_181] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) ~[?:1.8.0_181] at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230) ~[?:1.8.0_181] at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434) ~[?:1.8.0_181] at java.nio.file.Files.newOutputStream(Files.java:216) ~[?:1.8.0_181] at net.szum123321.textile_backup.core.restore.decompressors.ZipDecompressor.decompress(ZipDecompressor.java:66) [textile_backup-2.1.0-prev-1.16-dev.jar:?] at net.szum123321.textile_backup.core.restore.RestoreBackupRunnable.run(RestoreBackupRunnable.java:78) [textile_backup-2.1.0-prev-1.16-dev.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
it's 2 a.m. in china, i have to go to sleep. if there is any problem, i'll reply tomorrow :)
there should be some files in this folder, but it's empty after restore