diff options
author | Andrea Weikert <elubie@gmx.net> | 2006-08-20 18:41:13 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2006-08-20 18:41:13 +0400 |
commit | ffe630b452f4abb28c105fca2b8eb9fdb6e72370 (patch) | |
tree | 82f27ea61114c3d66ec8f5bacc393b96af8df12c /source/blender/blenlib/intern/storage.c | |
parent | 8dd3a792f09a3c1c495c38a37a73c219a8ff02fb (diff) |
Fixes for:
[ #4337 ] Cant refresh the C:\
[ #4710 ] Wrong paths in file selector under user prefs
[ #4353 ] Using ^ char + click on Open/Load = Blender crash
Details:
Fixes for root paths like C:\ on Windows, where Blender still used '/'.
Also contains fixes for relative paths:
- no relative paths for the default dirs (forced to absolute)
- message if using relative paths when .blend file hasn't been saved.
Lastly also added '.' for refresh in root paths. Windows
FindFirstFile/FindNextFile also return '.' and '..', but not in root paths like C:\
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 0487154f7df..f667676117b 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -277,6 +277,14 @@ void BLI_builddir(char *dirname, char *relname) BLI_addhead(dirbase,dlink); newnum++; } +#else // WIN32 + if (seen_ == 0) { /* should only happen for root paths like "C:\" */ + dlink = (struct dirlink *)malloc(sizeof(struct dirlink)); + strcpy(buf+rellen,"."); + dlink->name = BLI_strdup(buf); + BLI_addhead(dirbase,dlink); + newnum++; + } #endif if (files) files=(struct direntry *)realloc(files,(totnum+newnum) * sizeof(struct direntry)); |