C
C#15mo ago
`Habib

❔ cant delete folders from appdata local and roaming

public static void UbisoftCache() { string appDataLocal = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); string appDataRoaming = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string digitalEntitlementsPath = Path.Combine(appDataLocal, "DigitalEntitlements"); string citizenFXPath = Path.Combine(appDataRoaming, "CitizenFX"); try { // Usuń folder DigitalEntitlements, jeśli istnieje if (Directory.Exists(digitalEntitlementsPath)) { Directory.Delete(digitalEntitlementsPath, true); } // Usuń folder CitizenFX, jeśli istnieje if (Directory.Exists(citizenFXPath)) { Directory.Delete(citizenFXPath, true); } } catch (Exception ex) { // Obsłuż wyjątki, jeśli wystąpiły Console.WriteLine("Wystąpił błąd podczas usuwania folderów: " + ex.Message); } }
4 Replies
`Habib
`HabibOP15mo ago
generally i don't know how to remove the folder from appdaty local and roaming i tried everything but it doesn't work
Azrael
Azrael15mo ago
Most likely a permission issue. They could also be used by another process, locked. Add ex.StackTrace to the catch block.
`Habib
`HabibOP15mo ago
thannks
Accord
Accord15mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server