~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/blender/src/filelist.c

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: filelist.c 14285 2008-03-30 16:18:01Z elubie $
 
2
 * $Id: filelist.c 16677 2008-09-22 15:37:32Z campbellbarton $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
629
629
 
630
630
void BIF_filelist_parent(struct FileList* filelist)
631
631
{
632
 
#ifdef WIN32
633
 
        char c = '\\';
634
 
#else
635
 
        char c = '/';
636
 
#endif
637
 
        char *dir = filelist->dir;
638
 
        size_t len = strlen(dir);
639
 
        
640
 
        while( (len > 0) && (dir[len-1] == c)  )
641
 
        {
642
 
                --len;
643
 
                dir[len] = '\0';
644
 
        }
645
 
        while ( (len > 0) && (dir[len-1] != c) )
646
 
        {
647
 
                --len;
648
 
                dir[len] = '\0';
649
 
        }
650
 
        if (len == 0)
651
 
        {
652
 
                dir[0] = c; dir[1] = '\0';
653
 
        }
654
 
#ifdef WIN32
655
 
        strcat(filelist->dir, "\\");
656
 
#else
657
 
        strcat(filelist->dir, "/");
658
 
#endif
659
 
        
660
 
        BLI_cleanup_dir(G.sce, filelist->dir);
 
632
        BLI_parent_dir(filelist->dir);
661
633
        BLI_make_exist(filelist->dir);
662
634
        BIF_filelist_readdir(filelist);
663
635
}