8d2bf87277494370755394880fb0bb15f2ed69ef
[reactos.git] / lib / msvcrt / direct / chdir.c
1 #include <windows.h>
2 #include <msvcrt/ctype.h>
3 #include <msvcrt/direct.h>
4
5
6 /*
7  * @implemented
8  */
9 int _chdir(const char* _path)
10 {
11     if (_path[1] == ':')
12         _chdrive(tolower(_path[0] - 'a')+1);
13     if (!SetCurrentDirectoryA((char*)_path))
14         return -1;
15     return 0;
16 }