Saving error on vfat/ntfs

Home Forums cherrytree Saving error on vfat/ntfs

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1928

    In the function file_write uses the function shutil.copy (ln 1126).
    But in the python standard lib shutil, the function copy uses the function copymod,
    If you use linux on ntfs partition, in copymod function, hasattr(os, ‘chmod’) return true but the filesystem don’t support it really.

    To resolve badly, I put the code in the try block.
    shutil.copy(filepath, filepath + cons.CHAR_TILDE)
    except OSError as e:
    if e.errno == 1 and filepath.startswith(‘/mnt/’):
    print “Chmod failed on mntpoint”

    Se può essere utile…


    I will reproduce this problem and fix it, maybe with a system call to “cp” when linux os is detected.
    Grazie 😛

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.