/*
- * Copyright (C) 2006-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
{
if (!mkdir(path, mode))
return 1;
- return -E_OSL_MKDIR;
+ return errno == EEXIST? -E_OSL_DIR_EXISTS : -E_OSL_MKDIR;
}
/**
{
if (stat(path, buf) >= 0)
return 1;
- return -E_OSL_STAT;
+ return errno == ENOENT? -E_OSL_NOENT : -E_OSL_STAT;
}