ClassiCube icon indicating copy to clipboard operation
ClassiCube copied to clipboard

Launcher fails to start game if executable is renamed/moved while game is running

Open UnknownShadow200 opened this issue 4 years ago • 3 comments

Problem seems to be that GetModuleFileName doesn't update when the file on disc is moved https://stackoverflow.com/questions/20176184/winapi-find-directory-of-own-executeable-when-location-is-changed https://stackoverflow.com/questions/20792076/how-can-i-get-the-application-name-after-it-has-been-renamed/26271422 https://stackoverflow.com/questions/23368645/createprocess-from-a-handle-and-not-from-path https://cygwin.com/cygwin-ug-net/highlights.html

Untested on other operating systems.

UnknownShadow200 avatar Aug 29 '20 03:08 UnknownShadow200

Is this on windows? I will test on linux (if you havent already). EDIT: I guess it'd do the same thing but idk

TheAwesome98-Real avatar Aug 29 '20 11:08 TheAwesome98-Real

Windows issue definitely, but doesn't happen with Linux. (The way the full path of the executable is completely different for each supported operating system)

Not that this is an actually important bug or anything though

UnknownShadow200 avatar Aug 29 '20 11:08 UnknownShadow200

yeah cause who would rename the executable while it was running?

TheAwesome98-Real avatar Aug 30 '20 14:08 TheAwesome98-Real