Displaying 3 results from an estimated 3 matches for "root_directory".
2016 Apr 18
2
Redundant Twine->StringRef->Twine conversions in llvm::sys::fs::make_absolute?
llvm::sys::fs::make_absolute converts its first parameter (const Twine
¤t_directory) to StringRef p(path.data(), path.size()), and then
passes that StringRef to several functions (path::has_root_directory,
path::has_root_name, and path::append) that accept Twines as parameters.
Since llvm::StringRef can implicitly convert to an llvm::Twine, p converts
to a bunch of Twine temporaries.
In a few places, namely path::has_root_directory & path::has_root_name,
that temporary Twine is again converted...
2006 Feb 01
1
ActiveRecord::FileSystem???
Rails makes working with databases easy with ActiveRecord::Base.
Has anyone written a rails system for working with files so we can do
things like:
class User < ActiveRecord::FileSystem
root_directory "c:/uploads"
file_permissions
directory_permissions
validates_filetype
validates_filesize
validates_filename
before_save
I know about file_column, but I don''t want to use a database.
--
Posted via http://www.ruby-forum.com/.
2017 Jun 16
2
[PATCH] allow relative path in streamlocal forwarding
...+++ b/channels.c
@@ -2996,6 +2996,59 @@ channel_setup_fwd_listener_tcpip(int type, struct Forward *fwd,
return success;
}
+/* Expands a relative socket path to the absolute path, from the given
+ * root directory. */
+static char *
+expand_relative_socket_path(const char *pathname, const char *root_directory)
+{
+ char *ret, *cp;
+ struct stat st;
+
+ if (*pathname == '/')
+ return xstrdup(pathname);
+
+ if (xasprintf(&ret, "%s/%s", root_directory, pathname) >= PATH_MAX) {
+ error("Socket path too long");
+ free(ret);
+ return NULL;
+ }
+
+ cp = ret + strlen(root_...