diff options
| author | oy <Tom_Adams@web.de> | 2010-10-07 23:51:07 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-10-07 23:51:07 +0200 |
| commit | 6a26cd6621b5f0b70177b0d17ed433b5669f1314 (patch) | |
| tree | a0964f5ed7797058b0718492142126ed55f790cc /src/base | |
| parent | 3a98f7a048c044ce0d870320fc0b1def0db4f7fb (diff) | |
| download | zcatch-6a26cd6621b5f0b70177b0d17ed433b5669f1314.tar.gz zcatch-6a26cd6621b5f0b70177b0d17ed433b5669f1314.zip | |
fixed various problems with the file dialog in the editor
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/system.c | 6 | ||||
| -rw-r--r-- | src/base/system.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/base/system.c b/src/base/system.c index 25e89896..6a70452f 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -997,7 +997,7 @@ int fs_chdir(const char *path) return 1; } -void fs_parent_dir(char *path) +int fs_parent_dir(char *path) { char *parent = 0; for(; *path; ++path) @@ -1007,7 +1007,11 @@ void fs_parent_dir(char *path) } if(parent) + { *parent = 0; + return 0; + } + return 1; } void swap_endian(void *data, unsigned elem_size, unsigned num) diff --git a/src/base/system.h b/src/base/system.h index 62fe02e9..3d0d5cc7 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -970,10 +970,13 @@ int fs_chdir(const char *path); Parameters: path - The directory string + Returns: + Returns 0 on success, 1 on failure. + Remarks: - The string is treated as zero-termineted string. */ -void fs_parent_dir(char *path); +int fs_parent_dir(char *path); /* Group: Undocumented |