Changeset 10907

Timestamp:
Jan 14, 2012, 7:46:20 PM (13 years ago)
Author:
philip
Message:

Include *.DELETED files when building archives. See #1110.

Location:
ps/trunk/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/lib/file/vfs/vfs.h

    r10610 r10907  
    1 /* Copyright (c) 2010 Wildfire Games
     1/* Copyright (c) 201 Wildfire Games
    22 *
    33 * Permission is hereby granted, free of charge, to any person obtaining
     
    5858     * (the default behavior is to create all real directories in the path)
    5959     **/
    60     VFS_MOUNT_MUST_EXIST = 4
     60    VFS_MOUNT_MUST_EXIST = 4,
     61
     62    /**
     63     * keep the files named "*.DELETED" visible in the VFS directories.
     64     * the standard behavior of hiding the file with the same name minus the
     65     * ".DELETED" suffix will still apply.
     66     * (the default behavior is to hide both the suffixed and unsuffixed files)
     67     **/
     68    VFS_MOUNT_KEEP_DELETED = 8
    6169};
    6270
  • ps/trunk/source/lib/file/vfs/vfs_populate.cpp

    r10631 r10907  
    1 /* Copyright (c) 2010 Wildfire Games
     1/* Copyright (c) 201 Wildfire Games
    22 *
    33 * Permission is hereby granted, free of charge, to any person obtaining
     
    8989        {
    9090            m_directory->RemoveFile(name.Basename());
    91             return;
     91            if(!(m_realDirectory->Flags() & VFS_MOUNT_KEEP_DELETED))
     92                return;
    9293        }
    9394
     
    122123        {
    123124            directory->RemoveFile(name.Basename());
    124             return;
     125            if(!(this_->m_realDirectory->Flags() & VFS_MOUNT_KEEP_DELETED))
     126                return;
    125127        }
    126128
  • ps/trunk/source/ps/ArchiveBuilder.cpp

    r9550 r10907  
    1 /* Copyright (C) 2010 Wildfire Games.
     1/* Copyright (C) 201 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
     
    4444    m_VFS->Mount(L"cache/", m_TempDir/"_archivecache/");
    4545
    46     m_VFS->Mount(L"", mod/"", VFS_MOUNT_MUST_EXIST);
     46    m_VFS->Mount(L"", mod/"", VFS_MOUNT_MUST_EXIST);
    4747
    4848    // Collect the list of files before loading any base mods
Note: See TracChangeset for help on using the changeset viewer.