mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-17 08:01:24 +00:00
Fix for user name on Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37773 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9d220fdfad
commit
93438554c3
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-03-27 German Arias <germanandre@gmx.es>
|
||||
|
||||
* Framework/PCFileCreator.m: Be sure to use an UTF8 string for the user
|
||||
name on Windows.
|
||||
|
||||
2014-03-08 German Arias <germanandre@gmx.es>
|
||||
|
||||
* Framework/PCFileManager.m (-isTextFile:): Rewrite this method to work
|
||||
|
|
|
@ -297,12 +297,26 @@ static NSDictionary *dict = nil;
|
|||
|
||||
while ((subRange = [file rangeOfString:@"$USERNAME$"]).length)
|
||||
{
|
||||
#ifdef WIN32
|
||||
// Be sure to use an UTF8 string.
|
||||
[file replaceCharactersInRange: subRange
|
||||
withString: [NSString stringWithCString:
|
||||
[NSUserName() UTF8String]]];
|
||||
#else
|
||||
[file replaceCharactersInRange:subRange withString:NSUserName()];
|
||||
#endif
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$FULLUSERNAME$"]).length)
|
||||
{
|
||||
#ifdef WIN32
|
||||
// Be sure to use an UTF8 string.
|
||||
[file replaceCharactersInRange: subRange
|
||||
withString: [NSString stringWithCString:
|
||||
[NSFullUserName() UTF8String]]];
|
||||
#else
|
||||
[file replaceCharactersInRange:subRange withString:NSFullUserName()];
|
||||
#endif
|
||||
}
|
||||
|
||||
while ((subRange = [file rangeOfString:@"$PROJECTNAME$"]).length)
|
||||
|
|
Loading…
Reference in a new issue