diff options
author | Jacek Antonelli | 2009-06-08 00:41:31 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-06-08 00:41:31 -0500 |
commit | 0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa (patch) | |
tree | 2c93d38e210832e737d09cff7561373d8d5453b2 /linden/indra/llvfs/lldir.cpp | |
parent | Imprudence 1.1.0 released. (diff) | |
parent | Updated Imprudence to be based on SL 1.22.11. (ChangeLog Entry) (diff) | |
download | meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.zip meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.gz meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.bz2 meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.xz |
Merge branch 'sl-base-1.22' into next
Conflicts:
linden/indra/newview/English.lproj/InfoPlist.strings
linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llvfs/lldir.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index 8cd2b5c..1dc00dd 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2008, Linden Research, Inc. | 7 | * Copyright (c) 2002-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -497,6 +497,29 @@ std::string LLDir::getTempFilename() const | |||
497 | return temp_filename; | 497 | return temp_filename; |
498 | } | 498 | } |
499 | 499 | ||
500 | // static | ||
501 | std::string LLDir::getScrubbedFileName(const std::string uncleanFileName) | ||
502 | { | ||
503 | std::string name(uncleanFileName); | ||
504 | const std::string illegalChars(getForbiddenFileChars()); | ||
505 | // replace any illegal file chars with and underscore '_' | ||
506 | for( unsigned int i = 0; i < illegalChars.length(); i++ ) | ||
507 | { | ||
508 | int j = -1; | ||
509 | while((j = name.find(illegalChars[i])) > -1) | ||
510 | { | ||
511 | name[j] = '_'; | ||
512 | } | ||
513 | } | ||
514 | return name; | ||
515 | } | ||
516 | |||
517 | // static | ||
518 | std::string LLDir::getForbiddenFileChars() | ||
519 | { | ||
520 | return "\\/:*?\"<>|"; | ||
521 | } | ||
522 | |||
500 | void LLDir::setLindenUserDir(const std::string &first, const std::string &last) | 523 | void LLDir::setLindenUserDir(const std::string &first, const std::string &last) |
501 | { | 524 | { |
502 | // if both first and last aren't set, assume we're grabbing the cached dir | 525 | // if both first and last aren't set, assume we're grabbing the cached dir |