Sevenless wrote:derkami wrote:Check if you have that file there:
C:\Users\User\AppData\Roaming\Haven and Hearth\data\b2a83fcec412dbee.0
Yeet it...
Also are you sometimes running as "administrator" for your AHK tools?
Access Denied COULD be a wrong error message, since you should have full access to that folder, however, you can create a file with permissions that deny you access there...
So I guess check out if you have that file and yeet it...
Gave it a go. I usually forget to run AHK in admin so I tried it after deleting the file you mentioned. It seemed to work at first. Got this after a while although it hasn't locked up again
haven: warning: weird I/O error occurred on haven.HashDirCache$2$$Lambda$678/0x0000000801055aa0@475abbaa
java.nio.file.AccessDeniedException: C:\Users\User\AppData\Roaming\Haven and Hearth\data\cache16167357955981228264.new -> C:\Users\User\AppData\Roaming\Haven and Hearth\data\b2a83fcef9047495.0
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:309)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:292)
at java.base/java.nio.file.Files.move(Files.java:1426)
at haven.HashDirCache$2.lambda$close$0(HashDirCache.java:332)
at haven.Utils.ioretry(Utils.java:925)
at haven.HashDirCache$2.close(HashDirCache.java:330)
at haven.StreamMessage.close(StreamMessage.java:118)
at haven.MapFile$ZoomGrid.save(MapFile.java:1029)
at haven.MapFile$ZoomGrid.from(MapFile.java:967)
at haven.MapFile$ZoomGrid.fetch(MapFile.java:851)
at haven.MapFile$Segment.lambda$loadzgrid$2(MapFile.java:1191)
at haven.Defer$Future.run(Defer.java:152)
at haven.Defer$Worker.run(Defer.java:252)
Well that's fun.
The code only handles a specific type of error, which seems to be wrong.
You could try to replace the error handling with the general Exception instead of AtomicMoveNotSupportedException.
Or add AccessDeniedException to that one to try and replace the existing file.
Still I'm worried about the specific permissions on that file, can you validate that you, in fact, have rights to like override the file without elevating your user rights? @ Sevenless
- Code: Select all
public void close() throws IOException {
st.close();
Utils.ioretry(() -> {
try {
return(Files.move(tmp, path, StandardCopyOption.ATOMIC_MOVE)); <- line that creates the exception for you
} catch(AtomicMoveNotSupportedException e) {
return(Files.move(tmp, path, StandardCopyOption.REPLACE_EXISTING));
}
});
cleaner.closed = true;
clean.run();
}