From 3a0c1187b2db598c59639ed030750b50b1ff94e4 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 18 Apr 2004 20:56:08 +0000 Subject: [PATCH] * vfsdummy.h [!USE_VFS]: Make sure that vfs_canon() doesn't change the original string. Fix compilation without VFS. --- src/ChangeLog | 5 +++++ src/vfsdummy.h | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 173a66480..d9774903b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-04-18 Pavel Roskin + + * vfsdummy.h [!USE_VFS]: Make sure that vfs_canon() doesn't + change the original string. Fix compilation without VFS. + 2004-03-07 Andrew V. Samoilov * achown.c (init_chown_advanced) [ENABLE_NLS]: i18n fix. diff --git a/src/vfsdummy.h b/src/vfsdummy.h index 97a1a41b7..c572f81de 100644 --- a/src/vfsdummy.h +++ b/src/vfsdummy.h @@ -57,7 +57,6 @@ return_zero (void) #define vfs_current_is_local() 1 #define vfs_file_is_local(x) 1 -#define vfs_canon(p) g_strdup (canonicalize_pathname(p)) #define vfs_strip_suffix_from_filename(x) g_strdup(x) #define vfs_file_class_flags(x) (VFSF_LOCAL) @@ -69,4 +68,12 @@ return_zero (void) #define vfs_timeout_handler() do { } while (0) #define vfs_timeouts() 0 +static inline char * +vfs_canon (const char *path) +{ + char *p = g_strdup (path); + canonicalize_pathname(p); + return p; +} + #endif /* !__VFSDUMMY_H */