View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002860 | Spring engine | General | public | 2011-12-23 13:53 | 2012-01-30 00:31 | ||||
Reporter | Licho | ||||||||
Assigned To | jK | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | 86.0 | Fixed in Version | |||||||
Summary | 0002860: Unitsync ignores SPRING_DATADIR and SPRING_ISOLATED | ||||||||
Description | With those things set to some folder, it still returns default WritableDirectory after init. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Licho (reporter) 2011-12-24 11:24 |
Can this be worked around in some way? Basically i need to tell unitsync to scan some given folder - to set extra datadir. |
abma (administrator) 2011-12-24 11:36 |
you could try to set SpringData in springsettings.cfg? https://github.com/spring/spring/blob/develop/rts/System/FileSystem/DataDirLocater.cpp#L307 i currently don't see why this code fails: https://github.com/spring/spring/blob/develop/rts/System/FileSystem/DataDirLocater.cpp#L225 |
Licho (reporter) 2011-12-24 11:52 |
I also dont understand why it fails. However it does. GetWritable shows default folder instead the one in env. |
Licho (reporter) 2011-12-24 12:01 |
Ignores springsettings.cfg with SpringData too.. even the local one in unitsync folder .. Perhaps issue isnt in datadirlocater but elsewhere. |
Licho (reporter) 2011-12-24 12:01 |
Also ignores HOME on windows |
abma (administrator) 2011-12-24 12:12 Last edited: 2011-12-24 12:19 |
SET SPRING_ISOLATED=C:\Some\Path seems to work... (at least for spring.exe, i hope unitsync does the same...) |
Licho (reporter) 2011-12-24 12:34 |
No, it does not work for unitsync. Only for spring.. Unitsync has its own mind it seems .. |
Licho (reporter) 2011-12-24 12:52 |
So far it ignores all of this... Directory.SetCurrentDirectory(paths.UnitSyncDirectory); Environment.SetEnvironmentVariable("SPRING_DATADIR", paths.WritableDirectory, EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable("HOME", paths.WritableDirectory, EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable("SPRING_ISOLATED", paths.WritableDirectory, EnvironmentVariableTarget.Process); File.WriteAllText(Path.Combine(paths.UnitSyncDirectory, "springsettings.cfg"), "SpringData = " + paths.WritableDirectory); if (!NativeMethods.Init(false, 666)) throw new UnitSyncException("Unitsync initialization failed."); Version = NativeMethods.GetSpringVersion(); var writ = NativeMethods.GetWritableDataDirectory(); |
jK (developer) 2012-01-30 00:31 |
https://github.com/spring/spring/commit/af9fe7e30d312932fd4928b8443477d364d3ed1a |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-12-23 13:53 | Licho | New Issue | |
2011-12-24 11:24 | Licho | Note Added: 0007993 | |
2011-12-24 11:36 | abma | Note Added: 0007994 | |
2011-12-24 11:52 | Licho | Note Added: 0007996 | |
2011-12-24 12:01 | Licho | Note Added: 0007997 | |
2011-12-24 12:01 | Licho | Note Added: 0007998 | |
2011-12-24 12:12 | abma | Note Added: 0008000 | |
2011-12-24 12:19 | abma | Note Edited: 0008000 | |
2011-12-24 12:34 | Licho | Note Added: 0008001 | |
2011-12-24 12:52 | Licho | Note Added: 0008002 | |
2012-01-09 23:09 | abma | Target Version | => 86.0 |
2012-01-30 00:31 | jK | Note Added: 0008229 | |
2012-01-30 00:31 | jK | Status | new => resolved |
2012-01-30 00:31 | jK | Resolution | open => fixed |
2012-01-30 00:31 | jK | Assigned To | => jK |