Commit a817d93656eb534cdbaaea68e44e5325169ad697

Authored by bellard
1 parent fd44d818

fixed handling of relative filenames with -snapshot


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2136 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 1 deletions
... ... @@ -335,8 +335,9 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
335 335 bdrv_delete(bs1);
336 336  
337 337 get_tmp_filename(tmp_filename, sizeof(tmp_filename));
  338 + realpath(filename, backing_filename);
338 339 if (bdrv_create(&bdrv_qcow2, tmp_filename,
339   - total_size, filename, 0) < 0) {
  340 + total_size, backing_filename, 0) < 0) {
340 341 return -1;
341 342 }
342 343 filename = tmp_filename;
... ...