Revision f2c04245 src/image/Image.cc

View differences:

src/image/Image.cc
87 87
    string public_attr;
88 88
    string persistent_attr;
89 89
    string dev_prefix;
90
    string source_attr;
90 91

  
91 92
    // ---------------------------------------------------------------------
92 93
    // Check default image attributes
......
154 155
    // ------------ PATH & SOURCE --------------------
155 156

  
156 157
    get_template_attribute("PATH", path_attr);
157
    get_template_attribute("SOURCE", source);
158
    get_template_attribute("SOURCE", source_attr);
158 159

  
159 160
    // The template should contain PATH or SOURCE
160
    if ( source.empty() && path_attr.empty() )
161
    if ( source_attr.empty() && path_attr.empty() )
161 162
    {
162 163
        string size_attr;
163 164
        string fstype_attr;
......
183 184
            goto error_size_format;
184 185
        }
185 186
    }
186
    else if ( !source.empty() && !path_attr.empty() )
187
    else if ( !source_attr.empty() && !path_attr.empty() )
187 188
    {
188 189
        goto error_path_and_source;
189 190
    }
191
    else if ( !source_attr.empty() )
192
    {
193
        source = source_attr;
194
    }
190 195

  
191 196
    state = LOCKED; //LOCKED till the ImageManager copies it to the Repository
192 197

  

Also available in: Unified diff