homy-game-studio / hgs-unity-local-storage

Gerencie arquivos e cache de forma segura em sua aplicação.
MIT License
0 stars 0 forks source link

Error on Invalidate empty CacheStorage #12

Closed MatheusMoura17 closed 2 years ago

MatheusMoura17 commented 2 years ago

Behaviour

cacheStorage.Invlidate(); throws DirectoryNotFoundException when the directory not exists yet.

Expected Behaviour

If the directory is not found, cacheStorage.Invlidate(); shold be ignored.

Error Stack


DirectoryNotFoundException: Could not find a part of the path "C:/Users/Matheus Moura/AppData/LocalLow/Homy Game Studio/Tower Stacker/pictures/b7286587de4425770717ffdac19fa1faa360fdeb5b5cb07676ecf492e2d121d4".
System.IO.File.Delete (System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
HGS.LocalStorage.Utils.FileUtility.Delete (System.String path) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/Utils/FileUtility.cs:34)
HGS.LocalStorage.CacheStorage.InvalidateFile (System.String path) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/CacheStorage.cs:29)
HGS.LocalStorage.CacheStorage.Invalidate (System.String key) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/CacheStorage.cs:16)
HGS.LocalStorage.CacheStorage.Exists (System.String key) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/CacheStorage.cs:41)
HGS.TinyPuzzleToolkit.StateDrawers.SpriteDownloadStateDrawer.Draw () (at C:/Users/Matheus Moura/workspace/hgs/hgs-unity-tiny-puzzle-toolkit/Assets/Package/Runtime/Scripts/StateDrawers/SpriteDownloadStateDrawer.cs:44)
HGS.TinyPuzzleToolkit.StateDrawers.SpriteDownloadStateDrawer.OnEnable () (at C:/Users/Matheus Moura/workspace/hgs/hgs-unity-tiny-puzzle-toolkit/Assets/Package/Runtime/Scripts/StateDrawers/SpriteDownloadStateDrawer.cs:24)
``
MatheusMoura17 commented 2 years ago

:tada: This issue has been resolved in version 1.1.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: