zathras / jovial_svg

Flutter library for robust, efficient rendering of SVG static images
BSD 3-Clause "New" or "Revised" License
115 stars 21 forks source link

fix: Bug in creating temporary directory #79

Closed hoangdt84 closed 1 year ago

hoangdt84 commented 1 year ago

On Windows, test('create SI smoke test', _createSI); failed due to following error

  PathNotFoundException: Creation of temporary directory failed, path = '/tmp\' (OS Error: The system cannot find the path specified.
  , errno = 3)
  dart:io                     _Directory.createTempSync
  test\test_main.dart 432:37  _createSI

And

  PathAccessException: Deletion failed, path = 'C:\Users\...\AppData\Local\Temp\a7e5e9bc' (OS Error: The process cannot access the file because it is being used by another process.
  , errno = 32)
  dart:io                    FileSystemEntity.deleteSync
  test\test_main.dart 439:9  _createSI

This PR try to fix it.

zathras commented 1 year ago

I went with a lower-impact change (https://github.com/zathras/jovial_svg/commit/a580b2d16669a287ff3e979fe978babbcc58b564), but thanks.