summaryrefslogtreecommitdiff
path: root/file_io/unix
diff options
context:
space:
mode:
authorbrane <brane@13f79535-47bb-0310-9956-ffa450edef68>2003-05-24 10:30:40 +0000
committerbrane <brane@13f79535-47bb-0310-9956-ffa450edef68>2003-05-24 10:30:40 +0000
commit220c6e4ea2e1c9b1d02fd9e974f204d384b96e53 (patch)
tree90067c91c24065b31468e36ba1723786099d29df /file_io/unix
parent2c468c984d461c5a699ad1e2c7677104bf752f72 (diff)
downloadlibapr-220c6e4ea2e1c9b1d02fd9e974f204d384b96e53.tar.gz
Added flag APR_FILE_ATTR_HIDDEN for manipulating the "hidden" file
attribute on Windows and OS/2. Also changed the apr_file_attrs_set implementations to not make any syscalls if the requested attributes are not supported on the platform. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64510 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix')
-rw-r--r--file_io/unix/filestat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/file_io/unix/filestat.c b/file_io/unix/filestat.c
index 0e0236e6b..02a4df975 100644
--- a/file_io/unix/filestat.c
+++ b/file_io/unix/filestat.c
@@ -166,6 +166,11 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
apr_status_t status;
apr_finfo_t finfo;
+ /* Don't do anything if we can't handle the requested attributes */
+ if (!(attr_mask & (APR_FILE_ATTR_READONLY
+ | APR_FILE_ATTR_EXECUTABLE)))
+ return APR_SUCCESS;
+
status = apr_stat(&finfo, fname, APR_FINFO_PROT, pool);
if (!APR_STATUS_IS_SUCCESS(status))
return status;