octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60875] Save function doesn't warn when disk i


From: Rik
Subject: [Octave-bug-tracker] [bug #60875] Save function doesn't warn when disk is full
Date: Sat, 3 Jul 2021 13:09:43 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36

Update of bug #60875 (project octave):

                  Status:                    None => Confirmed              
                 Release:                   6.2.0 => dev                    

    _______________________________________________________

Follow-up Comment #2:

Confirmed.

For testing, I used a file on /tmp which I mounted as a partition through a
loopback device.  Most of these commands require root privilege.


dd if=/dev/zeros of=/tmp/filepartition bs=1M count=10
mkdir /mnt/tmp_filepartition
losetup /dev/loop0 /tmp/filepartition
mount /dev/loop0 /mnt/tmp_filepartition
chmod -R 777 /mnt/tmp_filepartition


For a test file, I used


x = rand (1e3, 1e3);
save x.mat x


I tried to save directly to the partition, and as reported here that leads to
a truncated file with no warning whatsoever.

I tried the `copyfile` and `movefile` commands and they get it right.  See
session log below.


octave:6> copyfile ('x.mat', '/mnt/tmp_filepart/')
cp: error writing '/mnt/tmp_filepart/x.mat': No space left on device
error: copyfile: operation failed: 
error: called from
    copyfile at line 161 column 7
octave:7> movefile ('x.mat', '/mnt/tmp_filepart/')
mv: error writing '/mnt/tmp_filepart/x.mat': No space left on device
error: movefile: operation failed: 
error: called from
    movefile at line 177 column 7





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60875>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]