search for: basename

Displaying 20 results from an estimated 1330 matches for "basename".

2009 Sep 18
4
basename returns "." not in filename (PR#13958)
Full_Name: Jens Oehlschl?gel Version: 2.9.2 OS: Win32 Submission from: (NULL) (85.181.152.156) # Obviously an empty basename is allowed (if the filepath is a pure path) > basename("/") [1] "" # but here we get the dot from the path > basename("./") [1] "." > version _ platform i386-pc-mingw32 arch i38...
2010 Jun 25
1
Installing and running logcheck on CentOS
...iblockfile and lockfile-progs. I've created a logcheck user with /var/lib/logcheck as the home and /sbin/nologin as the shell. logcheck user is in the adm group. I also customised the list of logfiles for CentOS. When I run logcheck, I get the following errors: # sudo -u logcheck logcheck -ot basename: invalid option -- - Try `basename --help' for more information. basename: invalid option -- - Try `basename --help' for more information. basename: invalid option -- - Try `basename --help' for more information. basename: invalid option -- - Try `basename --help' for more informati...
2015 Feb 02
1
Re: [PATCH 5/6] New APIs: copy-in and copy-out
....h> > +#include <string.h> > + > +#include "guestfs.h" > +#include "guestfs-internal.h" > +#include "guestfs-internal-actions.h" > + > +static int split_path (char *buf, size_t buf_size, const char *path, const char **dirname, const char **basename); > + > +int > +guestfs__copy_in (guestfs_h *g, const char *localpath, const char *remotedir) > +{ > + CLEANUP_CMD_CLOSE struct command *cmd = guestfs___new_command (g); > + int fd; > + int r; > + char fdbuf[64]; > + size_t buf_len = strlen (localpath) + 1; > + c...
2009 Jan 09
4
Extracting File Basename without Extension
Dear all, The basename() function returns the extension also: > myfile <- "path1/path2/myoutput.txt" > basename(myfile) [1] "myoutput.txt" Is there any other function where it just returns plain base: "myoutput" i.e. without 'txt' - Gundala Viswanath Jakarta - Indonesi...
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
--- src/command.c | 64 +++++++++++++++++++++++++++++++++++++++++++------- src/guestfs-internal.h | 3 +++ 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/command.c b/src/command.c index 4bb469b..e26573d 100644 --- a/src/command.c +++ b/src/command.c @@ -360,7 +360,7 @@ debug_command (struct command *cmd) } static int -run_command (struct command *cmd)
2015 Jan 26
0
[PATCH 5/6] New APIs: copy-in and copy-out
...;sys/wait.h> +#include <errno.h> +#include <string.h> + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" + +static int split_path (char *buf, size_t buf_size, const char *path, const char **dirname, const char **basename); + +int +guestfs__copy_in (guestfs_h *g, const char *localpath, const char *remotedir) +{ + CLEANUP_CMD_CLOSE struct command *cmd = guestfs___new_command (g); + int fd; + int r; + char fdbuf[64]; + size_t buf_len = strlen (localpath) + 1; + char buf[buf_len]; + const char *dirname, *basenam...
2003 Apr 08
1
IRIX compilation and openbsd-compat/basename.h
I was trying to compile openssh-3.6.1p1 on IRIX and ran across this error while compiling progressmeter.c: "/usr/include/libgen.h", line 35: error(1143): declaration is incompatible with "char *basename(const char *)" (declared at line 9 of "openbsd-compat/basename.h") extern char *basename(char *); ^ 1 error detected in the compilation of "progressmeter.c". *** Error code 2 (bu21) I commented this line in openbsd-compat/basename.h: char *...
2003 Mar 31
2
basename() in libgen
IRIX 6.5 has the basename() function in libgen. SYNOPSIS cc [flag ...] file ... -lgen [library ...] #include <libgen.h> char *basename (char *path); -- ayamura
2020 Jun 29
1
`basename` and `dirname` change the encoding to "UTF-8"
On 29/06/2020 10:39 a.m., Johannes Rauh wrote: > Dear R Developers, > > I noticed that `basename` and `dirname` always return "UTF-8" on Windows (tested with R-4.0.0 and R-3.6.3): > >> p <- "F??/B?r" >> Encoding(p) > [1] "latin1" >> Encoding(dirname(p)) > [1] "UTF-8" >> Encoding(basename(p)) > [1] "UTF-8"...
2009 Nov 22
0
file_path_as_absolute duplicates "/" (PR#14078)
Full_Name: Jens Oehlschl?gel Version: 2.10.0 OS: Windows XP Submission from: (NULL) (85.181.157.36) file_path_as_absolute duplicates "/" for files in the root path, which goes back to the fact that file.path(dirname(x), basename(x)) currently is not guaranteed to restore x > x <- "d:/x.RDAta" > file_path_as_absolute(x) [1] "d://x.RData" > file.path(dirname(x), basename(x)) [1] "d://x.RData" > dirname(x) [1] "d:/" > x <- "/" > file.path(dirname(x)...
2010 Aug 29
1
how to take a os.path.basename
Hi, all I made a simple R script to take the basename of a file without directory names. path.splitted <- strsplit('/path/to/a_basename', '/') path.length <- length(path.splitted[[1]]) basename <- path.splitted[[1]][path.length] # basename <- 'a_basename' Is there a simple function for this? something like os.pat...
2015 Feb 02
8
[PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize
Hi, attached there is the second version of the patch series adding copy_in and copy_out in the library, mostly moving them from guestfish. It also adds the copy_in usage in virt-customize, as aid in a new image building. Thanks, Pino Toscano (7): cmd: add a way to run (and wait) asynchronously commands cmd: add a child-setup callback cmd: add the possibility to get a fd to the process
2003 Apr 02
1
[Bug 531] Conflicting basename() on Irix
http://bugzilla.mindrot.org/show_bug.cgi?id=531 Summary: Conflicting basename() on Irix Product: Portable OpenSSH Version: 3.6p1 Platform: MIPS OS/Version: IRIX Status: NEW Severity: major Priority: P2 Component: Build system AssignedTo: openssh-unix-dev at mindrot.org ReportedBy...
2017 Jan 31
3
[nbdkit PATCH 0/2] fix pod and other errors in recent patches
POD errors are not nice, and 'pod2man --stderr' does not do what we want. Eric Blake (2): perl: Fix previous patches build: Kill build on POD error .gitignore | 2 ++ configure.ac | 10 +--------- docs/Makefile.am | 8 ++++++-- docs/nbdkit-plugin.pod | 2 +- plugins/curl/Makefile.am | 4 +++-
2010 Feb 15
4
Changing the :path and :url options of has_attached_file in paperclip
...n to upload images and it works absolutely fine. I intend to save my uploaded images to C:\Application_name\public folder. Accordingly, with some study over the i-net, I changed the :path option of has_attached_file to - :path => "C:/Application_name/ public/:class/:attachment/:id/:style_:basename.:extension" Now, the files are being saved to the desired path. However, I need to understand what should be the corresponding change in the :url option. I tried everything - :url => "/:id/:style_:basename.:extension" :url => "C:/Application_name/ public/:class/:attachm...
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing. Based on Daivd''s branch ''integration-20130903''. Gui Hecheng (5): btrfs-progs:free local variable buf upon unsuccessful returns btrfs-progs:local variable memory freed btrfs-progs: missing tree-freeing statements added btrfs-progs:free the local list pending_list in btrfs_scan_one_dir
2008 Oct 09
1
Problem installing samba
...The SWAT files have been installed. Remember to read the documentation for information on enabling and using SWAT ====================================================================== ./install-sh -c bin/libtalloc.so.1 //usr/local/samba/lib if test -e bin/libtalloc.so.1 ; then \ ??????? ln -s -f `basename bin/libtalloc.so.1` \ ??????????????? //usr/local/samba/lib/`basename bin/libtalloc.so` ; \ fi sh: test: argument expected *** Error code 1 (ignored) : bin/libtalloc.a //usr/local/samba/lib ./install-sh -c -m 0644 /usr/local/samba/samba-3.2.4/source/lib/talloc/talloc.h //usr/local/samba/include ./i...
2003 Apr 02
0
[Bug 532] Conflicting basename and dirname on solaris
http://bugzilla.mindrot.org/show_bug.cgi?id=532 Summary: Conflicting basename and dirname on solaris Product: Portable OpenSSH Version: 3.6p1 Platform: UltraSparc OS/Version: Solaris Status: NEW Severity: normal Priority: P2 Component: Build system AssignedTo: openssh-unix-dev at mindrot...
2008 May 14
2
basename/dirname produce incorrect results
The incorrect result incurs when the file path contains Chinese character. It seems that dirname/basename action on unit of byte instead of char, so the result in the following example is half of what is expected. > g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt" > dirname(g) [1] "d:/$BG!2L4^(B" > basename(g) [1] "$BG!2L4^M-(B" -- HUANG Ronggui, Wincent htt...
2020 Jun 30
1
`basename` and `dirname` change the encoding to "UTF-8"
On 6/29/20 4:39 PM, Johannes Rauh wrote: > Dear R Developers, > > I noticed that `basename` and `dirname` always return "UTF-8" on Windows (tested with R-4.0.0 and R-3.6.3): > >> p <- "F??/B?r" >> Encoding(p) > [1] "latin1" >> Encoding(dirname(p)) > [1] "UTF-8" >> Encoding(basename(p)) > [1] "UTF-8"...