Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoBackups: Open file backup, doesn't work #23

Open
CIRCLE73 opened this issue Sep 22, 2015 · 3 comments
Open

AutoBackups: Open file backup, doesn't work #23

CIRCLE73 opened this issue Sep 22, 2015 · 3 comments

Comments

@CIRCLE73
Copy link

When I go to the Command Palette and choose AutoBackups: Open file backup it shows an alert box saying "Backups for this file not exists!" but if I go to the backup directory I can see multiple backups of the same file stored.

This are my configurations:

{
    // Don't make changes to this file directly as they can get wiped out when the
    // plugin is updated. Instead transfer what you need to the 'Settings - User' file.

    // The directory where we'll keep our backups. If empty, we'll try to put them in
    // D:/Sublime Text Backups
    "backup_dir": "/Users/OC/sublime_backups/",

    // If true, also save a backup copy any time a file is opened (if backup file not exists)
    "backup_on_open_file": false,

    // If true, backups saved per day, in separate folders, for example D:/Sublime Text Backups/2013-05-23/myfile.php
    "backup_per_day": true,

    // If set, backups saved per second. possible values: false, "folder" or "file"
    // false - disabled backup per second
    // "folder" - backup example D:/Sublime Text Backups/2013-05-23/095034/myfile.php
    // "file" - backup example D:/Sublime Text Backups/2013-05-23/myfile_095034.php
    // to use this feature, you must have enabled backup_per_day setting
    "backup_per_time": "folder",

    // Files larger than this many bytes won't be backed up.
    "max_backup_file_size_bytes": 262144, // = 256 KB

    // Files older than X days will be deleted. If 0 - auto delete disabled
    "delete_old_backups": 20, // days to delete

    // If true, backup file opened in same line as cursor in original file
    "open_in_same_line": true,

    // If true, show backup previews
    "show_previews": true
}
@CIRCLE73
Copy link
Author

I've noticed that if I set "backup_per_time": "folder", to "backup_per_time": "file", it works correctly.

@aa6
Copy link

aa6 commented Aug 25, 2016

I have this settings (default with no changes) and backup on opening a file doesn't work.

{
    // Don't make changes to this file directly as they can get wiped out when the
    // plugin is updated. Instead transfer what you need to the 'Settings - User' file.

    // The directory where we'll keep our backups. If empty, we'll try to put them in
    // ~/sublime_backups
    "backup_dir": "~/sublime_backups",

    // If true, also save a backup copy any time a file is opened (if backup file not exists)
    "backup_on_open_file": true,

    // If true, backups saved per day, in separate folders, for example ~/sublime_backups/2013-05-23/myfile.php
    "backup_per_day": true,

    // If set, backups saved per second. possible values: false, "folder" or "file"
    // false - disabled backup per second
    // "folder" - backup example D:/Sublime Text Backups/2013-05-23/095034/myfile.php
    // "file" - backup example D:/Sublime Text Backups/2013-05-23/myfile_095034.php
    // to use this feature, you must have enabled backup_per_day setting
    "backup_per_time": "file",

    // Files larger than this many bytes won't be backed up.
    "max_backup_file_size_bytes": 262144, // = 256 KB

    // Files older than X days will be deleted. If 0 - auto delete disabled
    "delete_old_backups": 0, // days to delete

    // ignore files/folders which match regexes
    "ignore_regexes": [
        // VCS folders
        "/\\.svn/", "/\\.hg/", "/\\.git/", "/\\.bzr/"
        // binary extensions
        ,"\\.(jpg|JPG|jpeg|JPEG|pjpeg|PJPEG|gif|GIF|png|PNG|apng|APNG|bmp|BMP|mp3|MP3|mid|MID|wav|WAV|au|AU|mp4|MP4|3gp|3GP|avi|AVI|wmv|WMV|mpeg|MPEG|mpg|MPG|mkv|MKV|swf|SWF|flv|FLV|zip|ZIP|rar|RAR|tar|TAR|tgz|TGZ|gz|GZ|bz2?|BZ2?|pdf|PDF|docx?|DOCX?|xlsx?|XLSX?|pptx?|PPTX?|rtf|RTF|psd|PSD|cdr|CDR|fla|FLA|exe|EXE)$"
    ],

    // If true, backup file opened in same line as cursor in original file
    "open_in_same_line": true,

    // If true, show backup previews (only in ST3)
    "show_previews": true

}

@aa6
Copy link

aa6 commented Aug 25, 2016

It happens when ST3 is closed and I open ST3 by opening the file in a file manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants