ryanqq / chewing

Automatically exported from code.google.com/p/chewing
0 stars 0 forks source link

Current directory problem #180

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This issue is imported from
http://rt.openfoundry.org/Foundry/Project/Tracker/Display.html?Queue=271&id=2733
2

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Comment by guest, 2007-01-31 20:00:23:
版本 0.3.4.2 for windows
ChewingServer.exe

當 ChewingServer.exe 初次啟動時, 會把 Current 
directory設定為他啟動時正在使用的 Application 的 Path. 
這造成了一個困擾, 有時候我要改目錄名稱, 
結果該目錄被鎖定.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Comment by guest, 2007-02-05 04:16:13:
我自己改好了, 修正如下:

win32-chewing\ChewingServer\ChewingServer.cpp

bool ChewingServer::startServer()
{
...
    GetUserDataPath( hashdir );
    Chewing::LoadDataFiles( datadir, hashdir );

+   TCHAR appdir[MAX_PATH];
+   GetModuleFileName( NULL, appdir, MAX_PATH );
+       (_tcsrchr(appdir,'\\'))[1] = '\0';
+       SetCurrentDirectory(appdir);

    return true;
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Comment by cchance, 2007-11-20 03:24:15:
能請閣下去SVN上改嗎?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Comment by cchance, 2007-11-20 03:54:54:
sky008888, 可否請您幫忙更新?

Original issue reported on code.google.com by kuang...@gmail.com on 27 Nov 2007 at 1:24

GoogleCodeExporter commented 9 years ago

Original comment by kuang...@gmail.com on 27 Nov 2007 at 1:25

GoogleCodeExporter commented 9 years ago

Original comment by kuang...@gmail.com on 23 Oct 2008 at 11:29