summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)Author
2010-05-05* file.c (rb_stat): use STAT macro instead of calling stat() directly.usa
reported by Bill Kelly. [ruby-core:30012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03* file.c (rb_str_encode_ospath): unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* merge some patches from win32-uncode-test branch.usa
see #1685. * file.c, include/ruby/intern.h (rb_str_encode_ospath): new function to convert encoding for pathname. * win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename, rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir, rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to accept UTF-8 path. * win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime, rb_w32_unlink): use WCHAR path internally. * file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype, chmod_internal, rb_file_chmod, rb_file_chown, utime_internal, rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version functions on Win32. * file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p, rb_file_readable_p, rb_file_writable_p, rb_file_executable_p, check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown, rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call rb_str_encode_ospath() before passing the path to system. * io.c (rb_sysopen): ditto. * dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* file.c (file_expand_path): call rb_str_set_len before BUFCHECK toakr
prevent rb_str_resize in BUFCHECK discard the content. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrongmarcandre
number of arguments * file.c (rb_f_test, rb_file_s_umask): ditto * numeric.c (int_chr, num_step): ditto * process.c (rb_f_sleep): ditto * re.c (rb_reg_initialize_m): ditto * signal.c (rb_f_kill, sig_trap): ditto * string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, rb_str_delete_bang, rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto * proc.c (curry): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-19* file.c (rb_file_s_extname): skip last directory separators.nobu
[ruby-core:29627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-30* file.c (rb_file_dirname): split from rb_file_s_dirname.nobu
* load.c (rb_f_require_relative): use absolute path instead of expanded path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-25* file.c (rb_get_path_check): prefer #to_path over #to_str. a patchmame
originally written by me, and modified by Nobuyoshi Nakada. [ruby-core:24257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-24* file.c (file_expand_path): set length of string before callingnaruse
rb_enc_check because rb_enc_check scans its content. This prevents warnings by valgrind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16* compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolutemame
path field into rb_iseq_t. The field contains a string representing a path to corresponding source file. or nil when the iseq is created from -e, stdin, eval, etc. This field is used for require_relative. [ruby-dev:40004] * load.c (rb_f_require_relative): add C implementation of require_relative. * prelude.rb (require_relative): get rid of Ruby implementation of require_relative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16* file.c (file_expand_path): ignore dname if it has differentnobu
drive letter or UNC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14* file.c (Init_File): do not define File::ALT_SEPARATOR on cygwin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14* file.c (realpath_rec): use same cache.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14* file.c (file_alt_separator): commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14* file.c (FILE_ALT_SEPARATOR): separated condition.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13* file.c (EXPAND_PATH_BUFFER): make it back to usascii, to preventmatz
infinite loop on some platform. [ruby-dev:40629] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13* file.c (file_expand_path): should not just copy the encodingmatz
from fname. [ruby-core:28635] * file.c (EXPAND_PATH_BUFFER): set filesystem_encoding, not usascii for path buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13* load.c (rb_get_expanded_load_path): does not expand paths if allshugo
the items in $: are absolute paths. [ruby-core:28113] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-12* file.c (rb_file_s_basename): check encoding of suffix.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-07* file.c: add optional basedir argument for realpath/realdirpath.akr
(realpath_internal): handle basedir. (rb_file_s_realpath): extract basedir from argument list. (rb_file_s_realdirpath): extract basedir from argument list. * lib/pathname.rb (realpath): pass basedir. (realdirpath): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-06* encoding.c (enc_set_filesystem_encoding):naruse
filesystem encoding on Mac OS X is now default external encoding. so Mac OS X is now treated as one of Unix. [ruby-dev:40439] * file.c (file_path_convert): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-02* file.c (rb_find_file_ext_safe, rb_find_file_safe): skip argumentnobu
checks in file_expand_path(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-16* file.c (rb_group_member): renamed from group_member.akr
don't use group_member() in glibc because it's not valgrind clean. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570047 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03* file.c (realpath_rec): rb_path_last_separator may return NULL.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* file.c (be_chown, be_fchown, eaccess): suppressed warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* dln.c, file.c, io.c, signal.c: add __HAIKU__.naruse
patched by Alexander von Gluck [ruby-core:27767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* string.c (rb_str_set_len): call rb_str_modify.akr
* file.c (realpath_rec): don't call rb_str_modify before rb_str_set_len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* file.c (realpath_internal): call rb_secure.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* file.c (realpath_rec): trace symbolic link only when supportingusa
readline(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]akr
* include/ruby/intern.h: declare rb_dir_getwd. * dir.c (rb_dir_getwd): copied from dir_s_getwd to export. (dir_s_getwd): use rb_dir_getwd. * file.c (rb_file_s_realpath): new method File.realpath. (rb_file_s_realdirpath): new method File.realdirpath. * lib/pathname.rb (Pathname#realpath): use File.realpath. (Pathname#realdirpath): use File.realdirpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-07* file.c (rb_f_test): use string form in unknown command errorakr
message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24* file.c (file_path_convert): fix fs_encoding is not assign.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-21* file.c (file_path_convert): delay getting UTF8-MAC encodingnaruse
while really needed. [ruby-core:26807] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* file.c (file_path_convert): delay getting filesystem encodingusa
while really needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* io.c (rb_scan_open_args): move path encoding conversionnaruse
for filesystem encoding of Mac OS X. * file.c (file_path_convert): added for convert encoding of file path. * file.c (rb_get_path_check): add file_path_convert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28* string.c: rdoc for <=>, casecmpmarcandre
* bignum.c: rdoc for <=> * file.c: ditto * time.c: ditto * compar.c: rdoc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10* file.c (path_check_0): prevent from GC.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* win32/win32.c, include/ruby/win32.h (rb_w32_access): new function tousa
replace MSVCRT's access(). [ruby-core:25761] * file.c (eaccess): workaround for recent MSVCRT is no longer needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-19* dir.c (GlobPathValue), file.c (rb_get_path_check): path namesnobu
must be ASCII compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09* file.c (stat_data_type): typed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* suppressed shorten-64-to-32 warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-08* file.c (rb_file_s_basename): returns new string instead ofnobu
shared string from FilePathStringValue(). [ruby-core:24199] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29* file.c (BUFCHECK): use common bdiff.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29* file.c (file_expand_path): should copy original encoding.nobu
[ruby-dev:38612] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-23* file.c (rb_get_path_check): check with given safe level.nobu
* file.c (rb_find_file_ext_safe, rb_find_file_safe): ditto. * safe.c (rb_insecure_operation): function to raise security error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-23* file.c (rb_find_file_ext, rb_find_file): no needs to expandnobu
paths with tilde twice. * load.c (rb_f_load): load the given path directly if not found in load_path. * load.c (search_required): search file in specified safe level. * load.c (rb_require_safe): path to load is already searched in search_required(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* io.c: remove __CHECKER__ test.akr
* dir.c: ditto. * dln.c: ditto. * file.c: ditto. * process.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-17* file.c (file_expand_path): drive letter is ascii only.nobu
[ruby-dev:38612] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-14* file.c (rb_find_file_ext, rb_find_file): canonicalize absolutenobu
paths. [ruby-core:23845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-14* file.c (rb_file_size): added rdoc. a patch from Run Paint Runnobu
Run at [ruby-core:23839]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e