Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
diff --git a/source/Engine/main.cpp b/source/Engine/main.cpp
index 10c8101..d7ec2e4 100644
--- a/source/Engine/main.cpp
+++ b/source/Engine/main.cpp
@@ -298,7 +298,12 @@ int main(int argc, char *argv[]) try
#ifdef __APPLE__
// bundleFolder is set in applicationDidFinishLaunching.
#elif defined __unix__
- bundleFolder = copyString(DATADIR); // DATADIR is defined in the Makefile.
+ bundleFolder = getenv("SLUDGE_DATADIR");
+ if (bundleFolder == NULL)
+ {
+ bundleFolder = copyString(DATADIR); // DATADIR is defined in the Makefile.
+ fprintf(stderr, "SLUDGE_DATADIR not found, defaulting to %s\n", bundleFolder);
+ }
#else
bundleFolder = copyString(argv[0]);
int lastSlash = -1;