Skip to content

System.IO.IOException: The process cannot access the file 'C:\Users\dte\AppData\Roaming\FancyWM\themes\custom.css' because it is being used by another process. #463

Description

@ReneMuala

Describe the bug
Observing the following error:

System.IO.IOException: The process cannot access the file 'C:\Users\dte\AppData\Roaming\FancyWM\themes\custom.css' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.File.WriteToFile(String path, FileMode mode, ReadOnlySpan`1 contents, Encoding encoding)
   at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
   at FancyWM.Utilities.ThemeEngineManager.EnsureCustomThemeFileExists()
   at FancyWM.Utilities.ThemeEngineManager.SetTheme(String themeFileName)
   at FancyWM.Utilities.ThemeEngineManager.Initialize(String themeDir, String themeFileName)
   at FancyWM.MainWindow..ctor()
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

To Reproduce
Steps to reproduce the behavior:

  1. Open '...'
  2. Resize '....'
  3. Enable '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: Microsoft Windows NT 10.0.26200.0
  • FancyWM Version: 2.19.0.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions