ACEmulator / ACE

Asheron's Call server emulator.

Home Page:https://emulator.ac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't completely depend on current directory

fartwhif opened this issue · comments

Bug Report or Feature Request (mark with an x)

- [  ] bug report -> please search issues before submitting
- [ X ] feature request

Repro steps.

CD to a directory other than the binary directory
start the binary

The log given by the failure.

2022-08-06 16:56:56,130 INFO : Initializing ConfigManager...
2022-08-06 16:56:56,253 INFO : Pruning invalid friends from all friend lists...
2022-08-06 16:56:57,530 INFO : Pruned 0 invalid friends found on friend lists.
2022-08-06 16:56:57,532 INFO : Automatic Server version check started...
2022-08-06 16:56:57,813 INFO : Current Server Binary: 1.45.4247.20220723040320-master-0221a72
2022-08-06 16:56:58,190 INFO : Latest Server Version is v1.45.4247 -- No Update Required!
2022-08-06 16:56:58,193 INFO : Automatic World Database Update started...
2022-08-06 16:56:58,238 INFO : Current World Database version: Base - v0.8.5 | Patch - v0.9.258
2022-08-06 16:56:58,467 INFO : Latest patch version is v0.9.258 -- No Update Required!
2022-08-06 16:56:58,467 INFO : Automatic World Database Update complete.
Searching for World Customization SQL scripts ....
World Customization SQL scripts import complete!
2022-08-06 16:56:58,558 INFO : Automatic Database Patching started...
Searching for Authentication update SQL scripts ....
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\projects\ace\ACE-Plugins\Dependencies\DatabaseSetupScripts\Updates\Authentication'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern)
   at ACE.Server.Program.PatchDatabase(String dbType, String host, UInt32 port, String username, String password, String authDB, String shardDB, String worldDB) in C:\projects\ace\pluginfull\Source\ACE.Server\Program_DbUpdates.cs:line 253
   at ACE.Server.Program.AutoApplyDatabaseUpdates() in C:\projects\ace\pluginfull\Source\ACE.Server\Program_DbUpdates.cs:line 231
   at ACE.Server.Program.Main(String[] args) in C:\projects\ace\pluginfull\Source\ACE.Server\Program.cs:line 212
2022-08-06 16:56:59,562 ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\projects\ace\ACE-Plugins\Dependencies\DatabaseSetupScripts\Updates\Authentication'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern)
   at ACE.Server.Program.PatchDatabase(String dbType, String host, UInt32 port, String username, String password, String authDB, String shardDB, String worldDB) in C:\projects\ace\pluginfull\Source\ACE.Server\Program_DbUpdates.cs:line 253
   at ACE.Server.Program.AutoApplyDatabaseUpdates() in C:\projects\ace\pluginfull\Source\ACE.Server\Program_DbUpdates.cs:line 231
   at ACE.Server.Program.Main(String[] args) in C:\projects\ace\pluginfull\Source\ACE.Server\Program.cs:line 212

Desired functionality.

It should fall back to using reflection to derive file and folder paths (as it does with configuration files)

Mention any other details that might be useful.

#3886 addresses this