* chmod.c (stat_file): Eliminate. Use mc_stat().
* chmod.h: Remove unneded code. * chown.h: Likewise. * main.c: Include achown.h.
Этот коммит содержится в:
родитель
82a7b75a7b
Коммит
9c72f81a21
@ -1,5 +1,10 @@
|
||||
2003-10-24 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* chmod.c (stat_file): Eliminate. Use mc_stat().
|
||||
* chmod.h: Remove unneded code.
|
||||
* chown.h: Likewise.
|
||||
* main.c: Include achown.h.
|
||||
|
||||
* fileopctx.h: Define struct FileOpContext.
|
||||
* background.h: Avoid conditional declarations.
|
||||
|
||||
|
@ -617,7 +617,7 @@ static void apply_advanced_chowns (struct stat *sf)
|
||||
do {
|
||||
fname = next_file ();
|
||||
|
||||
if (!stat_file (fname, sf))
|
||||
if (mc_stat (fname, sf) != 0)
|
||||
break;
|
||||
ch_cmode = sf->st_mode;
|
||||
if (mc_chmod (fname, get_mode ()) == -1)
|
||||
@ -646,7 +646,7 @@ chown_advanced_cmd (void)
|
||||
else
|
||||
fname = selection (cpanel)->fname; /* single file */
|
||||
|
||||
if (!stat_file (fname, sf_stat)){ /* get status of file */
|
||||
if (mc_stat (fname, sf_stat) != 0) { /* get status of file */
|
||||
destroy_dlg (ch_dlg);
|
||||
break;
|
||||
}
|
||||
|
12
src/chmod.c
12
src/chmod.c
@ -219,14 +219,6 @@ init_chmod (void)
|
||||
return ch_dlg;
|
||||
}
|
||||
|
||||
int stat_file (char *filename, struct stat *st)
|
||||
{
|
||||
if (mc_stat (filename, st))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void chmod_done (void)
|
||||
{
|
||||
if (need_update)
|
||||
@ -262,7 +254,7 @@ static void apply_mask (struct stat *sf)
|
||||
|
||||
do {
|
||||
fname = next_file ();
|
||||
if (!stat_file (fname, sf))
|
||||
if (mc_stat (fname, sf) != 0)
|
||||
return;
|
||||
c_stat = sf->st_mode;
|
||||
|
||||
@ -285,7 +277,7 @@ void chmod_cmd (void)
|
||||
else
|
||||
fname = selection (cpanel)->fname; /* single file */
|
||||
|
||||
if (!stat_file (fname, &sf_stat)){ /* get status of file */
|
||||
if (mc_stat (fname, &sf_stat) != 0) { /* get status of file */
|
||||
destroy_dlg (ch_dlg);
|
||||
break;
|
||||
}
|
||||
|
@ -1,7 +1,4 @@
|
||||
#ifndef __CHMOD_H
|
||||
#define __CHMOD_H
|
||||
void chmod_cmd (void);
|
||||
int stat_file (char *, struct stat *);
|
||||
void ch1_cmd (int id);
|
||||
void ch2_cmd (int id);
|
||||
#endif
|
||||
|
@ -255,7 +255,7 @@ chown_cmd (void)
|
||||
else
|
||||
fname = selection (cpanel)->fname; /* single file */
|
||||
|
||||
if (!stat_file (fname, &sf_stat)){ /* get status of file */
|
||||
if (mc_stat (fname, &sf_stat) != 0) { /* get status of file */
|
||||
destroy_dlg (ch_dlg);
|
||||
break;
|
||||
}
|
||||
|
@ -1,7 +1,4 @@
|
||||
#ifndef __CHOWN_H
|
||||
#define __CHOWN_H
|
||||
|
||||
void chown_cmd (void);
|
||||
void chown_advanced_cmd (void);
|
||||
|
||||
#endif
|
||||
|
@ -75,6 +75,7 @@
|
||||
|
||||
#include "chmod.h"
|
||||
#include "chown.h"
|
||||
#include "achown.h"
|
||||
|
||||
#ifdef WITH_SMBFS
|
||||
#include "../vfs/smbfs.h" /* smbfs_set_debug() */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user