Commit Graph

92 Commits

Author SHA1 Message Date
Andrew V. Samoilov 12ba0fc8a4 * direntry.c (vfs_s_retrieve_file): Please, care about
fish.local_stat ...
* fish.c (linear_close): ... here.
2002-05-21 17:27:30 +00:00
Andrew V. Samoilov a844c07aac * direntry.c (vfs_s_read): Move MEDATA->linear_start() ...
* (vfs_s_open): ... here.
2002-05-17 07:08:03 +00:00
Andrew V. Samoilov 7df53e2bd2 * direntry.c (vfs_s_resolve_symlink): Comment out buggy code.
(vfs_s_retrieve_file): Set fh->handle to -1.
(vfs_s_read): Don't manipulate with FH->handle if it is -1.
(vfs_s_write): Likewise.
(vfs_s_close): Likewise.
2002-03-06 08:46:35 +00:00
Andrew V. Samoilov 1711c0ab8b * direntry.c (vfs_s_retrieve_file): Use off_t for total
and stat_size.

* vfs.c (vfs_s_resolve_symlink): Use snprintf
instead of sprintf.
(vfs_print_stats): Use off_t for have and need.  Cast
have to double to eliminate negative percent(s).
Fix print_vfs_message string formats.

* vfs.h (vfs_print_stats): Adjust declaration.

* ftpfs.c (file_store): Use off_t for total.
Fix print_vfs_message string format.
2002-02-08 09:42:38 +00:00
Pavel Roskin 0b36c6e5eb * direntry.c (vfs_s_free_super): Remove i18n on commented out
developer-only code.
2001-08-16 22:23:05 +00:00
Pavel Roskin 680f3f7ed2 * cpio.c: Include <config.h> before everything else.
* direntry.c: Likewise.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* local.c: Likewise.
* tar.c: Likewise.
* utilvfs.h: Don't include <config.h> - it should be included
in all C files instead.
* xdirentry.h: Likewise.
2001-06-25 21:34:46 +00:00
Pavel Roskin 5da3b42969 * ftpfs.c: Declare functions without declarations static. Don't
omit `void' in declarations.
* cpio.c: Likewise.
* direntry.c: Likewise.
* extfs.c: Likewise.
* mcfs.c: Likewise.
* tar.c: Likewise.
* vfs.c: Likewise.
* vfs.h: Likewise.
* mcserv.c: Likewise. Remove unused functions.
2001-06-14 20:08:27 +00:00
Pavel Roskin bea09b932d * src/ext.c (exec_extension): Use mc_mkstemps().
* src/user.c (execute_menu_command): Use mc_mkstemps().
* src/util.c (mc_mkstemps): New function - safely create and
open temporary file. Return the handle and the name.
* src/util.h: Declarations for init_tmpdir() and mc_mkstemps().
Define TMPDIR_DEFAULT and SCRIPT_SUFFIX.
* vfs/direntry.c (vfs_s_open): Use mc_mkstemps. Create and close
temporary file to reserve its name on the filesystem.
(vfs_s_retrieve_file): Use mc_mkstemps().
(g_tempnam): Remove.
* vfs/extfs.c (extfs_open): Use mc_mkstemps().
* vfs/sfs.c (redirect): Likewise.
* vfs/shared_ftp_fish.c (_get_file_entry): Likewise.
(retrieve_file): Likewise.
* vfs/vfs.c (mc_def_getlocalcopy): Likewise.
* vfs/xdirentry.h: Remove declaration of g_tempnam().
2001-05-21 16:21:07 +00:00
Pavel Machek 55e56a1426 Fixes from Roland: we may not g_free() strdup-ed text. 2000-10-31 15:43:49 +00:00
Pavel Machek 7d50be2f1c Do not leave st_nlink uninitialized. 2000-05-10 10:19:00 +00:00
Pavel Machek 8542ae3328 Fixed problems with stating / of ftp archive; minor bugfix. 2000-05-03 19:10:52 +00:00
Pavel Machek d91a2b9a63 2000-04-28 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* direntry.c (vfs_s_internal_stat): added ugly special case for /
        of archive to always exist. It seems I'm hiding some underlying
        problem :-(.
2000-04-28 07:56:30 +00:00
Pavel Machek d7bf5305b1 2000-04-26 Andrew V. Samoilov <sav@bcs.zp.ua>
* direntry.c (vfs_s_find_entry_tree): segfault fixed when root is NULL

        (vfs_s_new_inode, vfs_s_new_entry): g_new replaced by g_new0

        * ftpfs.c (dir_load): ent->name is free()d for "." and ".."

        (ftpfs_directory_timeout): default value changed to 900

        (netrc_next): "const char * const keywords" go to rodata and is shared
2000-04-28 07:43:13 +00:00
Pavel Machek a1225de8b3 Fix problems with stating / of ftp server + NO_LOCALHASH to prevent
podfuk deadlocs
2000-04-16 19:13:00 +00:00
Pavel Machek 425dbd07c1 2000-03-31 Andrew V. Samoilov <sav@bcs.zp.ua>
* vfs.c (mc_def_getlocalcopy): free() replaced by g_free() to prevent
	  crushes with mad, thanks to Timur I. Bakeyev <timur@bat.ru>
	* fish.c (linear_start): name wasn't freed after usage
	* cpio.c (cpio_ungetlocalcopy): return type changed to int,
	  function return 0 now
	* direntry.c (vfs_s_close, vfs_s_resolve_symlink): memory, allocated
	  by vfs_s_fullpath () is freed after use
	* ftpfs.c (linear_start): ditto;
2000-04-05 13:08:42 +00:00
Pavel Machek aa6cbcbc89 2000-01-31 Andrew V. Samoilov <sav@bcs.zp.ua>
* direntry.c: (vfs_s_resolve_symlink, vfs_s_readlink) fixed segfaults
	for broken symlinks like 2001 -> The Space Oddysea.
2000-01-31 13:48:00 +00:00
Pavel Machek 28eb60242d ftpfs can not handle homes nicely. Is there good way to solve this? 2000-01-24 12:35:52 +00:00
Pavel Machek 748e4c38f9 1999-12-15 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* Merged changes by Andrew V. Samoilov <sav@bcs.zp.ua>. They are
	mostly internationalization + fixing stupid bugs of mine
1999-12-16 12:55:16 +00:00
Pavel Machek bcfd532240 1999-12-08 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* ftpfs.c: basically replaced ftpfs with new one. Unlike the
        previous one, this uses new direntry.c layer, so shared_ftp_fish.c
        can be killed.

        This is new code, so beware.
1999-12-08 11:39:14 +00:00
Pavel Machek a0878908e1 1999-02-17 Pavel Machek <pavel@bug.ucw.cz>
* direntry.c (vfs_s_getlocalcopy): fixed segfault, getlocalcopy's
	name has to be malloced.
1999-11-03 14:51:22 +00:00
Norbert Warmuth d988df6100 1999-08-18 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/direntry.c (vfs_s_getlocalcopy): There's an aditional strdup
needed. In rare cases a pointer was freed twice. Pavel Machek
pointed this out a while ago but obviously it hasn't been fixed, yet.

* vfs/sfs.c (vfmake): Quote characters with a special meaning to the
shell in filenames/-pathes (Fix Bug #1931, VFS will not work if
your full path has the space character in it.).
1999-08-18 19:08:56 +00:00
Miguel de Icaza 7ca0948527 OS/2 portability changes by Ilya 1999-02-13 21:39:18 +00:00
Timur Bakeyev e57da1f7b3 Glibing....
Wed Jan 27 03:09:48 1999  Timur I. Bakeyev <mc@bat.ru>

	* All around the source: Changed copy_strings() to g_strconcat(). Modi-
	fy last parameter in concat_dir_and_file() to "" - to prevent stack from
	disbalancing.
1999-01-27 00:49:11 +00:00
Timur Bakeyev bf81009392 Actually commit all my changers. Fear :> 1999-01-20 22:01:11 +00:00
Miguel de Icaza a89cb1c50a Make the code compile, take 2 1999-01-17 23:10:53 +00:00
Miguel de Icaza 3eb8325e67 Make the code compile.
Reindent
1999-01-17 23:10:05 +00:00
Paul Sheer fa40fbcafa more fixes to resolve symlinks 1999-01-17 12:33:45 +00:00
Paul Sheer ff2b951de7 vfs_s_find_entry_tree() does not actually follow symlinks - fixed 1999-01-17 11:46:42 +00:00
Paul Sheer e035287a51 vfs_s_resolve_symlink(): convert absolute linknames to relative linkname with some leading ../ 1999-01-17 10:07:37 +00:00
Miguel de Icaza 85f17a4dc6 Lots of changes:
- SFS-based file systems now work on GNOME edition, I was
	  not waiting for child process to finish decompressing.

	- VFS code cleanup.  I am going to eventually get rid of all
	  the macro-mania that has creeped into the vfs layer.

Miguel
1999-01-11 00:48:23 +00:00
Miguel de Icaza 8f2327ecdb 1999-01-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gmetadata.c (gmeta_get_icon_pos): Fixed the memory leak here.

	* gicon.c (gicon_get_icon_for_file): Actually return a value
	here.

Editor fixes, vfs warning fixes;
1999-01-02 07:46:20 +00:00
Norbert Warmuth e4c8a9d060 Thu Dec 31 08:47:15 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* sfs.c (sfs_nothingisopen): Assume for now it's always save to free
this filesystem and delete temporary files. This needs further
investigation.

* tar.c: deleted unused empty struct tar_super.

Thu Dec 31 08:40:44 1998  Norbert Warmuth  <nwarmuth@privat.circular.de>

* direntry.c: Split fd_usage into fd_usage and ino_usage. fd_usage
was used for external and internal reference count. This was wrong
because we can free resources taken up by the vfs as soon as the
external reference count (now fd_usage) is zero. The internal
reference count (ino_usage) mustn't matter because the vfs has to
clean up itself in the correct order.
1998-12-31 15:54:49 +00:00
Norbert Warmuth d2b1a29c91 Fri Dec 25 21:48:51 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/direntry.c (vfs_s_new_inode): Moved initialization of st_ino
and st_dev from vfs_s_default_stat.

(vfs_s_default_stat): initialize st_ino and st_dev to zero

* vfs/tar.c (tar_open_archive): Make a new MEDATA->rdev for every
new archive.
1998-12-28 10:27:07 +00:00
Pavel Machek 3e1a72d64d Some fixes in src/ part (want_stale_data is now done right) and more
daring code in vfs/ (errors are now reported instead of silently
ignored)
1998-12-09 20:22:53 +00:00
Miguel de Icaza 301e7fbfc3 Many changes:
- Beginning of the CORBA support for the file manager.
	- Tk and XView code dropped.

Miguel
1998-12-02 23:44:06 +00:00
Sebastian Wilhelmi 8b8a943b6e 1998-12-02 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* fish.c (FISH_OP): changed snprintf to g_snprintf, as glib is
        used anyway.

        * xdirentry.h (LINK_NO_FOLLOW):
        * tar.c (read_header):
        * direntry.c (vfs_s_resolve_symlink):
        (vfs_s_inode_from_path):
        (vfs_s_open): renamed NO_FOLLOW and FOLLOW to LINK_NO_FOLLOW and
        LINK_FOLLOW resp. to avoid problems on solaris, where FOLLOW and
        NO_FOLLOW are defined in an enum.

        * vfs.h (ELAST): define it to 300, if not already defined, thats a
        bad hack, but what can we do....
1998-12-02 13:17:24 +00:00
Sung-Hyun Nam af1a952ea0 * direntry.c (vfs_s_new_super): Added the missing return value. 1998-12-02 05:11:48 +00:00
Pavel Machek 4029fef2f3 Small bugfixes, killing of debuging hacks that escaped me. 1998-11-22 16:17:42 +00:00
Pavel Machek 4706638b22 Big merge: fish now uses proper caching, small fixes almost
everywhere. I hope I did not break it too much.
1998-11-21 19:36:01 +00:00
Pavel Machek 226c2fcc4d Bugfixes 1998-10-28 16:07:55 +00:00
Miguel de Icaza c8a8394f56 Make it compile 1998-10-23 20:18:48 +00:00
Pavel Machek 37e364fe67 BIG changes: tar now uses brand-new direntry.c. Hope it does not hurt
too much.
1998-10-23 08:26:25 +00:00