Skip to content

Commit

Permalink
libdoomsday: Removed Dir_mkpath and Dir_SetCurrent
Browse files Browse the repository at this point in the history
de::NativePath should be used instead of these.
  • Loading branch information
skyjake committed Mar 20, 2016
1 parent 5eb1027 commit 9c83fd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Expand Up @@ -97,17 +97,17 @@ LIBDOOMSDAY_PUBLIC char* Dir_CurrentPath(void);
*/
LIBDOOMSDAY_PUBLIC void Dir_MakeAbsolutePath(char* path, size_t len);

/**
/*
* Check that the given directory exists. If it doesn't, create it.
* @return @c true if successful.
*/
LIBDOOMSDAY_PUBLIC dd_bool Dir_mkpath(const char* path);
//LIBDOOMSDAY_PUBLIC dd_bool Dir_mkpath(const char* path);

/**
/*
* Attempt to change the current working directory to the path defined.
* @return @c true if the change was successful.
*/
LIBDOOMSDAY_PUBLIC dd_bool Dir_SetCurrent(const char* path);
//LIBDOOMSDAY_PUBLIC dd_bool Dir_SetCurrent(const char* path);

#ifdef __cplusplus
} // extern "C"
Expand Down
5 changes: 4 additions & 1 deletion doomsday/apps/libdoomsday/src/filesys/sys_direc.cpp
Expand Up @@ -323,6 +323,7 @@ static int Dir_IsAbsolutePath(const char* path)
return false;
}

#if 0
dd_bool Dir_mkpath(const char* path)
{
#if !defined(WIN32) && !defined(UNIX)
Expand Down Expand Up @@ -369,6 +370,7 @@ dd_bool Dir_mkpath(const char* path)

return (0 == access(full, 0));
}
#endif

void Dir_MakeAbsolutePath(char* path, size_t len)
{
Expand Down Expand Up @@ -407,7 +409,7 @@ static void Dir_FixSeparators(char* path, size_t len)
}
}

dd_bool Dir_SetCurrent(const char* path)
/*dd_bool Dir_SetCurrent(const char* path)
{
LOG_AS("Dir");
Expand All @@ -419,3 +421,4 @@ dd_bool Dir_SetCurrent(const char* path)
LOG_RES_VERBOSE("Changing current directory to \"%s\" %s") << path << (success? "succeeded" : "failed");
return success;
}
*/
2 changes: 1 addition & 1 deletion doomsday/sdk/libcore/src/filesys/nativepath.cpp
Expand Up @@ -247,7 +247,7 @@ NativePath NativePath::workPath()
return currentNativeWorkPath;
}

bool NativePath::setWorkPath(const NativePath &cwd)
bool NativePath::setWorkPath(NativePath const &cwd)
{
if(QDir::setCurrent(cwd))
{
Expand Down

0 comments on commit 9c83fd3

Please sign in to comment.