diff --git a/qse/lib/si/fs-attr.c b/qse/lib/si/fs-attr.c index 92c1fe5a..cc1a68b0 100644 --- a/qse/lib/si/fs-attr.c +++ b/qse/lib/si/fs-attr.c @@ -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 defined(QSE_FCHOWNAT) + #if defined(HAVE_FCHOWNAT) int sysflags = 0; 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 defined(QSE_FCHMODAT) + #if defined(HAVE_FCHMODAT) int sysflags = 0; if (flags & QSE_FS_SETATTR_SYMLINK) sysflags |= AT_SYMLINK_NOFOLLOW; diff --git a/qse/lib/si/fs-copy.c b/qse/lib/si/fs-copy.c index 63f5bff7..bc662d3a 100644 --- a/qse/lib/si/fs-copy.c +++ b/qse/lib/si/fs-copy.c @@ -196,6 +196,7 @@ static int copy_file_in_fs (qse_fs_t* fs, cpfile_t* cpfile) { if (cpfile->flags & QSE_FS_CPFILE_FORCE) { +/* TODO: call cbs.rm callback??? */ QSE_UNLINK (cpfile->dst_fspath); 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 forced, delete it and try to open it again */ +/* TODO: call cbs.rm callback??? */ QSE_UNLINK (cpfile->dst_fspath); 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); } - static int copy_file (qse_fs_t* fs, cpfile_t* cpfile) { #if defined(NO_RECURSION) diff --git a/qse/lib/si/fs.c b/qse/lib/si/fs.c index 7e323f3e..2191d57f 100644 --- a/qse/lib/si/fs.c +++ b/qse/lib/si/fs.c @@ -659,7 +659,7 @@ qse_fs_ent_t* qse_fs_read (qse_fs_t* fs, int flags) case DT_LNK: fs->ent.type = QSE_FS_ENT_SYMLINK; break; - + case DT_BLK: fs->ent.type = QSE_FS_ENT_BLKDEV; 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; #if defined(QSE_FS_CHAR_IS_MCHAR) - fspath = path; + fspath = (qse_mchar_t*)path; #else fspath = qse_mbstowcsdupwithcmgr (path, QSE_NULL, fs->mmgr, fs->cmgr); if (!fspath) fs->errnum = QSE_FS_ENOMEM;