gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. 3ef4e2a49a36824753f2


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 3ef4e2a49a36824753f202868abb8fd32908bc1b
Date: Tue, 07 Dec 2010 14:57:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  3ef4e2a49a36824753f202868abb8fd32908bc1b (commit)
      from  15160b1eabd97f9ac430eb3393a06c4aea8669f0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=3ef4e2a49a36824753f202868abb8fd32908bc1b


commit 3ef4e2a49a36824753f202868abb8fd32908bc1b
Author: Sandro Santilli <address@hidden>
Date:   Tue Dec 7 15:56:25 2010 +0100

    Fix mkdirRecursive support for _absolute_ paths (sorry). Document both 
mkdirRecursive and mkdirUserPermissions

diff --git a/libbase/GnashFileUtilities.cpp b/libbase/GnashFileUtilities.cpp
index 53c184a..65ed875 100644
--- a/libbase/GnashFileUtilities.cpp
+++ b/libbase/GnashFileUtilities.cpp
@@ -45,6 +45,9 @@ mkdirRecursive(const std::string& filename)
     boost::char_separator<char> sep("/");
     Tok t(target, sep);
     std::string newdir;
+    // Start from the root if the given filename was given
+    // with an absolute path
+    if ( filename[0] == '/' ) newdir += "/";
 
     for (Tok::iterator tit = t.begin(); tit != t.end(); ++tit) {
 
diff --git a/libbase/GnashFileUtilities.h b/libbase/GnashFileUtilities.h
index cd1b2e3..de7f09c 100644
--- a/libbase/GnashFileUtilities.h
+++ b/libbase/GnashFileUtilities.h
@@ -48,6 +48,10 @@ namespace gnash {
     /// Create a directory, granting owner rwx permissions.
     //
     /// On non-POSIX systems, just create the directory.
+    /// 
+    /// @param dirname
+    ///        Directory name, may be absolute or relative to CWD
+    ///
     inline int mkdirUserPermissions(const std::string& dirname)
     {
 #if !defined(_WIN32) && !defined(_MSC_VER) && !defined(__amigaos4__)
@@ -68,6 +72,10 @@ namespace gnash {
     /// Create a directory for a given filename.
     //
     /// Everything after the last '/' is assumed to be the filename.
+    ///
+    /// @param filename
+    ///        Full file path, may be absolute or relative to CWD
+    ///
     DSOEXPORT bool mkdirRecursive(const std::string& filename);
 
 } // namespace gnash

-----------------------------------------------------------------------

Summary of changes:
 libbase/GnashFileUtilities.cpp |    3 +++
 libbase/GnashFileUtilities.h   |    8 ++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]