You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
The text of AlphaFS exceptions is returned in the OS language instead of the language of Thread.CurrentThread.CurrentUICulture:
Imports System.Globalization
Imports System.Threading
Imports System.Windows.Forms
Imports Alphaleonis.Win32.Filesystem
Imports SysIO = System.IO
Module Module1
Sub Main()
'On a German Windows...
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US")
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture
Directory.CreateDirectory("C:\Temp") 'Ensure folder exists
File.WriteAllText("C:\Temp\Foo.txt", "Some text...") 'Ensure file exists
Try
Directory.CreateDirectory("C:\Temp\Foo.txt")
Catch ex As Exception
Clipboard.SetText(ex.Message)
MsgBox(ex.Message) 'Displays "(183) Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist: [C:\Temp\Foo.txt]"
End Try
Try
SysIO.Directory.CreateDirectory("C:\Temp\Foo.txt")
Catch ex As Exception
Clipboard.SetText(ex.Message)
MsgBox(ex.Message) 'Displays "Cannot create "C:\Temp\Foo.txt" because a file or directory with the same name already exists."
End Try
End Sub
End Module
The text was updated successfully, but these errors were encountered:
The text of AlphaFS exceptions is returned in the OS language instead of the language of Thread.CurrentThread.CurrentUICulture:
The text was updated successfully, but these errors were encountered: