diff --git a/code/_byond_version_compat.dm b/code/_byond_version_compat.dm index df2f02d383b1..719d85654b5f 100644 --- a/code/_byond_version_compat.dm +++ b/code/_byond_version_compat.dm @@ -65,3 +65,15 @@ #define GLOBAL_PROC_REF(X) (/proc/##X) #endif + +#if (DM_VERSION == 515) +/// fcopy will crash on 515 linux if given a non-existant file, instead of returning 0 like on 514 linux or 515 windows +/// var case matches documentation for fcopy. +/world/proc/__fcopy(Src, Dst) + if (istext(Src) && !fexists(Src)) + return 0 + return fcopy(Src, Dst) + +#define fcopy(Src, Dst) world.__fcopy(Src, Dst) + +#endif