mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-07 00:21:28 +03:00
Merge branch 'mc-4.6'
This commit is contained in:
commit
9bed802084
@ -245,7 +245,7 @@ edit_save_file (WEdit *edit, const char *filename)
|
||||
this_save_mode = option_save_mode;
|
||||
if (this_save_mode != EDIT_QUICK_SAVE) {
|
||||
if (!vfs_file_is_local (filename) ||
|
||||
(fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) {
|
||||
(fd = mc_open (filename, O_RDONLY | O_BINARY)) == -1) {
|
||||
/*
|
||||
* The file does not exists yet, so no safe save or
|
||||
* backup are necessary.
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef __MHL_ENV_H
|
||||
#define __MHL_ENV_H
|
||||
|
||||
#include <mhl/string.h>
|
||||
|
||||
#define mhl_getenv_dup(name) (mhl_str_dup(name ? getenv(name) : ""))
|
||||
|
||||
#endif
|
@ -2,7 +2,7 @@
|
||||
#define __MHL_STRHASH_H
|
||||
|
||||
#include <hash.h>
|
||||
#include <mhl/mhlmemory.h>
|
||||
#include <mhl/memory.h>
|
||||
|
||||
static void __mhl_strhash_free_key(void* ptr)
|
||||
{
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <mhl/mhlmemory.h>
|
||||
#include <mhl/memory.h>
|
||||
|
||||
#define mhl_str_dup(str) ((str ? strdup(str) : strdup("")))
|
||||
#define mhl_str_ndup(str,len) ((str ? strndup(str,len) : strdup("")))
|
Loading…
x
Reference in New Issue
Block a user