Changeset 69400ec in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Apr 5, 2017 6:13:04 AM (8 years ago)
Author:
krzywon
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7f75a3f
Parents:
cfc6f3c7
git-author:
Jeff Krzywon <krzywon@…> (04/05/17 06:13:04)
git-committer:
krzywon <krzywon@…> (04/05/17 06:13:04)
Message:

Ask what to do with files that start with a period when loading directory. see #849

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    ra674d0b r69400ec  
    176176        for p_file in path: 
    177177            basename = os.path.basename(p_file) 
     178            # Skip files that start with a period 
     179            if basename.startswith("."): 
     180                msg = "The folder included a potential hidden file - %s." \ 
     181                      % basename 
     182                msg += " Do you wish to load this file as data?" 
     183                msg_box = wx.MessageDialog(None, msg, 'Warning', 
     184                                           wx.OK | wx.CANCEL) 
     185                if msg_box.ShowModal() == wx.ID_CANCEL: 
     186                    continue 
    178187            _, extension = os.path.splitext(basename) 
    179188            if extension.lower() in EXTENSIONS: 
Note: See TracChangeset for help on using the changeset viewer.