]> git.lyx.org Git - lyx.git/blobdiff - src/support/package.h
Don't use a global variable for avoiding removal of the system temp dir
[lyx.git] / src / support / package.h
index 6b70605c56833447d3169be96820f0c47da7eb44..69d11c6f762af35cfc90ecf61394af73a89461c2 100644 (file)
@@ -104,8 +104,13 @@ public:
         */
        std::string & document_dir() const;
 
-       /** The path to the temporary directory.
+       /** The path to the system temporary directory.
         *  (Eg /tmp on *nix.)
+        */
+       std::string const & system_temp_dir() const;
+
+       /** The path to the temporary directory used by LyX.
+        *  (Eg /tmp/lyx_tmpdir800nBI1z9 on *nix.)
         *  Can be reset by LyXRC.
         */
        std::string & temp_dir() const;
@@ -129,6 +134,7 @@ private:
        std::string locale_dir_;
        mutable std::string document_dir_;
        mutable std::string temp_dir_;
+       std::string system_temp_dir_;
        std::string home_dir_;
        std::string configure_command_;
        bool explicit_user_support_dir_;
@@ -186,6 +192,12 @@ std::string & Package::temp_dir() const
        return temp_dir_;
 }
 
+inline
+std::string const & Package::system_temp_dir() const
+{
+       return system_temp_dir_;
+}
+
 inline
 std::string const & Package::home_dir() const
 {