diff options
author | Jeremy Allison <jra@samba.org> | 1999-02-02 19:25:32 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1999-02-02 19:25:32 +0000 |
commit | f218a32646793e7d2f5dc7d9ceb49b7cbc3dd4da (patch) | |
tree | 4478319b5bde654dff433d221f9ee4ba5f495332 | |
parent | 9fae0d5cab19844a3311f915fce8b23209bcb695 (diff) | |
download | samba-f218a32646793e7d2f5dc7d9ceb49b7cbc3dd4da.tar.gz samba-f218a32646793e7d2f5dc7d9ceb49b7cbc3dd4da.tar.xz samba-f218a32646793e7d2f5dc7d9ceb49b7cbc3dd4da.zip |
Fixed bug for Turbo Pascal users where
echo >test.~pa
would create a file called : test.~pa.~pa.~pa.~pa
Jeremy.
-rw-r--r-- | source/smbd/mangle.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index b50f67fd4ac..fd0a622e4d0 100644 --- a/source/smbd/mangle.c +++ b/source/smbd/mangle.c @@ -589,6 +589,7 @@ static void cache_mangled_name( char *mangled_name, char *raw_name ) * * ************************************************************************** ** */ + BOOL check_mangled_cache( char *s ) { ubi_cacheEntryPtr FoundPtr; @@ -613,7 +614,11 @@ BOOL check_mangled_cache( char *s ) *ext_start = '\0'; FoundPtr = ubi_cacheGet( mangled_cache, (ubi_trItemPtr)s ); - *ext_start = '.'; + /* + * At this point s is the name without the + * extension. We re-add the extension if saved_ext + * is not null, before freeing saved_ext. + */ } } @@ -622,6 +627,7 @@ BOOL check_mangled_cache( char *s ) { if(saved_ext) { + /* Replace the saved_ext as it was truncated. */ (void)pstrcat( s, saved_ext ); free(saved_ext); } @@ -637,6 +643,7 @@ BOOL check_mangled_cache( char *s ) (void)pstrcpy( s, found_name ); if( saved_ext ) { + /* Replace the saved_ext as it was truncated. */ (void)pstrcat( s, saved_ext ); free(saved_ext); } |