changed wrong macro names
This commit is contained in:
parent
7ca53162de
commit
5a642d0dd6
@ -371,7 +371,7 @@ int qse_fs_setattrsys (qse_fs_t* fs, qse_fs_char_t* path, const qse_fs_attr_t* a
|
|||||||
|
|
||||||
if (flags & QSE_FS_SETATTR_OWNER)
|
if (flags & QSE_FS_SETATTR_OWNER)
|
||||||
{
|
{
|
||||||
#if defined(QSE_FCHOWNAT)
|
#if defined(HAVE_FCHOWNAT)
|
||||||
int sysflags = 0;
|
int sysflags = 0;
|
||||||
|
|
||||||
if (flags & QSE_FS_SETATTR_SYMLINK) sysflags |= AT_SYMLINK_NOFOLLOW;
|
if (flags & QSE_FS_SETATTR_SYMLINK) sysflags |= AT_SYMLINK_NOFOLLOW;
|
||||||
@ -399,7 +399,7 @@ int qse_fs_setattrsys (qse_fs_t* fs, qse_fs_char_t* path, const qse_fs_attr_t* a
|
|||||||
|
|
||||||
if (flags & QSE_FS_SETATTR_MODE)
|
if (flags & QSE_FS_SETATTR_MODE)
|
||||||
{
|
{
|
||||||
#if defined(QSE_FCHMODAT)
|
#if defined(HAVE_FCHMODAT)
|
||||||
int sysflags = 0;
|
int sysflags = 0;
|
||||||
|
|
||||||
if (flags & QSE_FS_SETATTR_SYMLINK) sysflags |= AT_SYMLINK_NOFOLLOW;
|
if (flags & QSE_FS_SETATTR_SYMLINK) sysflags |= AT_SYMLINK_NOFOLLOW;
|
||||||
|
@ -196,6 +196,7 @@ static int copy_file_in_fs (qse_fs_t* fs, cpfile_t* cpfile)
|
|||||||
{
|
{
|
||||||
if (cpfile->flags & QSE_FS_CPFILE_FORCE)
|
if (cpfile->flags & QSE_FS_CPFILE_FORCE)
|
||||||
{
|
{
|
||||||
|
/* TODO: call cbs.rm callback??? */
|
||||||
QSE_UNLINK (cpfile->dst_fspath);
|
QSE_UNLINK (cpfile->dst_fspath);
|
||||||
if (QSE_SYMLINK (tmpbuf, cpfile->dst_fspath) <= -1)
|
if (QSE_SYMLINK (tmpbuf, cpfile->dst_fspath) <= -1)
|
||||||
{
|
{
|
||||||
@ -250,6 +251,7 @@ static int copy_file_in_fs (qse_fs_t* fs, cpfile_t* cpfile)
|
|||||||
if (out <= -1 && (cpfile->flags & QSE_FS_CPFILE_FORCE))
|
if (out <= -1 && (cpfile->flags & QSE_FS_CPFILE_FORCE))
|
||||||
{
|
{
|
||||||
/* if forced, delete it and try to open it again */
|
/* if forced, delete it and try to open it again */
|
||||||
|
/* TODO: call cbs.rm callback??? */
|
||||||
QSE_UNLINK (cpfile->dst_fspath);
|
QSE_UNLINK (cpfile->dst_fspath);
|
||||||
out = QSE_OPEN (cpfile->dst_fspath, O_CREAT | O_WRONLY | O_TRUNC, cpfile->src_attr.mode);
|
out = QSE_OPEN (cpfile->dst_fspath, O_CREAT | O_WRONLY | O_TRUNC, cpfile->src_attr.mode);
|
||||||
}
|
}
|
||||||
@ -394,7 +396,6 @@ static void pop_cfs (qse_fs_t* fs, cpfile_t* cpfile, qse_dir_t** dir)
|
|||||||
QSE_MMGR_FREE (fs->mmgr, cfs);
|
QSE_MMGR_FREE (fs->mmgr, cfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int copy_file (qse_fs_t* fs, cpfile_t* cpfile)
|
static int copy_file (qse_fs_t* fs, cpfile_t* cpfile)
|
||||||
{
|
{
|
||||||
#if defined(NO_RECURSION)
|
#if defined(NO_RECURSION)
|
||||||
|
@ -659,7 +659,7 @@ qse_fs_ent_t* qse_fs_read (qse_fs_t* fs, int flags)
|
|||||||
case DT_LNK:
|
case DT_LNK:
|
||||||
fs->ent.type = QSE_FS_ENT_SYMLINK;
|
fs->ent.type = QSE_FS_ENT_SYMLINK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DT_BLK:
|
case DT_BLK:
|
||||||
fs->ent.type = QSE_FS_ENT_BLKDEV;
|
fs->ent.type = QSE_FS_ENT_BLKDEV;
|
||||||
break;
|
break;
|
||||||
@ -761,7 +761,7 @@ qse_fs_char_t* qse_fs_makefspathformbs (qse_fs_t* fs, const qse_mchar_t* path)
|
|||||||
qse_fs_char_t* fspath;
|
qse_fs_char_t* fspath;
|
||||||
|
|
||||||
#if defined(QSE_FS_CHAR_IS_MCHAR)
|
#if defined(QSE_FS_CHAR_IS_MCHAR)
|
||||||
fspath = path;
|
fspath = (qse_mchar_t*)path;
|
||||||
#else
|
#else
|
||||||
fspath = qse_mbstowcsdupwithcmgr (path, QSE_NULL, fs->mmgr, fs->cmgr);
|
fspath = qse_mbstowcsdupwithcmgr (path, QSE_NULL, fs->mmgr, fs->cmgr);
|
||||||
if (!fspath) fs->errnum = QSE_FS_ENOMEM;
|
if (!fspath) fs->errnum = QSE_FS_ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user